From e3582cd99672d0714482edb20edc17de2f5ac611 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 2 Nov 2020 18:23:38 +0000 Subject: [PATCH] legacy backend: render: fix leak of fbconfig Signed-off-by: Yuxuan Shui --- src/opengl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/opengl.h b/src/opengl.h index f50b092b..7a66e6aa 100644 --- a/src/opengl.h +++ b/src/opengl.h @@ -196,6 +196,9 @@ static inline void free_texture(session_t *ps, glx_texture_t **pptex) { */ static inline void free_paint_glx(session_t *ps, paint_t *ppaint) { free_texture(ps, &ppaint->ptex); +#ifdef CONFIG_OPENGL + free(ppaint->fbcfg); +#endif ppaint->fbcfg = NULL; } @@ -207,6 +210,5 @@ static inline void free_win_res_glx(session_t *ps, struct managed_win *w) { free_paint_glx(ps, &w->shadow_paint); #ifdef CONFIG_OPENGL free_glx_bc(ps, &w->glx_blur_cache); - free(w->paint.fbcfg); #endif }