Fix cairo surface memory leak

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2014-03-16 16:05:09 +01:00
parent 6b8bd49c0b
commit 1da87eca3c
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -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);
}