From 1da87eca3c5c56f487f397b3f7ddb0feb98ecaf9 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 16 Mar 2014 16:05:09 +0100 Subject: [PATCH] Fix cairo surface memory leak Signed-off-by: Uli Schlachter --- objects/client.c | 1 + objects/drawin.c | 1 + 2 files changed, 2 insertions(+) diff --git a/objects/client.c b/objects/client.c index 76f0128e..6f96588b 100644 --- a/objects/client.c +++ b/objects/client.c @@ -830,6 +830,7 @@ client_resize_do(client_t *c, area_t geometry, bool force_notice, bool honor_hin c->titlebar[bar].pixmap, globalconf.visual, area.width, area.height); drawable_set_surface(drawable, -1, surface, area); + cairo_surface_destroy(surface); } else drawable_set_geometry(drawable, -1, area); } else diff --git a/objects/drawin.c b/objects/drawin.c index b0cc2c37..290c3bee 100644 --- a/objects/drawin.c +++ b/objects/drawin.c @@ -119,6 +119,7 @@ drawin_update_drawing(drawin_t *w, int widx) w->pixmap, globalconf.visual, w->geometry.width, w->geometry.height); drawable_set_surface(w->drawable, -1, surface, w->geometry); + cairo_surface_destroy(surface); lua_pop(globalconf.L, 1); }