Ensure no memory leaks of glyph_matrix
; * src/dispnew.c (allocate_matrices_for_window_redisplay): Allocate each glyph_matrix only when it's NULL. (Bug#58028)
This commit is contained in:
parent
4b85ae6a24
commit
703f29d541
1 changed files with 4 additions and 1 deletions
|
@ -1810,9 +1810,12 @@ allocate_matrices_for_window_redisplay (struct window *w)
|
|||
if (w->desired_matrix == NULL)
|
||||
{
|
||||
w->desired_matrix = new_glyph_matrix (NULL);
|
||||
w->current_matrix = new_glyph_matrix (NULL);
|
||||
eassert (w->current_matrix == NULL);
|
||||
}
|
||||
|
||||
if (w->current_matrix == NULL)
|
||||
w->current_matrix = new_glyph_matrix (NULL);
|
||||
|
||||
dim.width = required_matrix_width (w);
|
||||
dim.height = required_matrix_height (w);
|
||||
adjust_glyph_matrix (w, w->desired_matrix, 0, 0, dim);
|
||||
|
|
Loading…
Add table
Reference in a new issue