[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 703f29d541: Ensure no memory leaks of glyph_matrix
From: |
Eli Zaretskii |
Subject: |
master 703f29d541: Ensure no memory leaks of glyph_matrix |
Date: |
Sat, 24 Sep 2022 12:08:30 -0400 (EDT) |
branch: master
commit 703f29d541e099c9f43b1b2877846e12098e7361
Author: Manuel Giraud <manuel@ledu-giraud.fr>
Commit: Eli Zaretskii <eliz@gnu.org>
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)
---
src/dispnew.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/dispnew.c b/src/dispnew.c
index b786f0f1ba..2568ba1086 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 703f29d541: Ensure no memory leaks of glyph_matrix,
Eli Zaretskii <=