mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.1.2107: various memory leaks reported by asan
Problem: Various memory leaks reported by asan. Solution: Free the memory. (Ozaki Kiichi, closes #5003)
This commit is contained in:
@@ -4602,6 +4602,7 @@ read_dump_file(FILE *fd, VTermPos *cursor_pos)
|
||||
}
|
||||
|
||||
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_T *rettv, int do_diff)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user