diff src/terminal.c @ 18225:6c3a8312486d v8.1.2107

patch 8.1.2107: various memory leaks reported by asan Commit: https://github.com/vim/vim/commit/8617348e2110c2c8387ea448a6258f1effa8d249 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Oct 1 17:02:16 2019 +0200 patch 8.1.2107: various memory leaks reported by asan Problem: Various memory leaks reported by asan. Solution: Free the memory. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/5003)
author Bram Moolenaar <Bram@vim.org>
date Tue, 01 Oct 2019 17:15:04 +0200
parents 4ac8161e92e0
children c8a53c0daeed
line wrap: on
line diff
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -4602,6 +4602,7 @@ read_dump_file(FILE *fd, VTermPos *curso
     }
 
     ga_clear(&ga_text);
+    ga_clear(&ga_cell);
     vim_free(prev_char);
 
     return max_cells;
@@ -4733,7 +4734,7 @@ term_load_dump(typval_T *argvars, typval
 	    buf = curbuf;
 	    while (!(curbuf->b_ml.ml_flags & ML_EMPTY))
 		ml_delete((linenr_T)1, FALSE);
-	    ga_clear(&curbuf->b_term->tl_scrollback);
+	    free_scrollback(curbuf->b_term);
 	    redraw_later(NOT_VALID);
 	}
     }