From 3a244967d18fc47702838fb29787b65ca84d8cfc Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Wed, 7 Jan 2026 13:53:09 +0100 Subject: [PATCH] xinit.c: free framewin_child_ptr after querying --- src/xinit.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xinit.c b/src/xinit.c index 9711ed2e..fab2f240 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -228,7 +228,7 @@ void windowid(const char *win_path) if (framewindow_nchildren==0) fprintf(errfp, "no framewin child\n"); else fprintf(errfp, "framewin child 0=%x\n", (unsigned int)framewin_child_ptr[0]); } - + XFree(framewin_child_ptr); /* here I create the icon pixmap,to be used when iconified, */ #ifdef __unix__ if(!cad_icon_pixmap) { @@ -2214,8 +2214,10 @@ static void resetcairo(int create, int clear, int force_or_resize) /* xctx->cairo_save_sfc is based on pixmap and pixmaps are not resizeable, so on resize * we must destroy & recreate everything. xctx->cairo_sfc can be resized using cairo_*_surface_set_size * being based on window */ + cairo_font_face_destroy(cairo_get_font_face(xctx->cairo_save_ctx)); cairo_destroy(xctx->cairo_save_ctx); cairo_surface_destroy(xctx->cairo_save_sfc); + cairo_font_face_destroy(cairo_get_font_face(xctx->cairo_ctx)); cairo_destroy(xctx->cairo_ctx); cairo_surface_destroy(xctx->cairo_sfc); xctx->cairo_save_ctx = NULL; @@ -2271,7 +2273,9 @@ static void resetcairo(int create, int clear, int force_or_resize) cairo_set_line_join(xctx->cairo_ctx, CAIRO_LINE_JOIN_ROUND); cairo_set_line_cap(xctx->cairo_ctx, CAIRO_LINE_CAP_ROUND); cairo_font_face_destroy(xctx->cairo_font); + xctx->cairo_font = NULL; cairo_font_options_destroy(options); + options = NULL; } #endif /* HAS_CAIRO */ }