From 91d2a505b28f44f5d0fbb7fd63e9f56e74bf12eb Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 12 Apr 2016 11:11:26 +1200 Subject: Plug two memory leaks Plug two memory leaks introduced in the border drawing code. --- sway/border.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sway/border.c') diff --git a/sway/border.c b/sway/border.c index 6343ddd0..411c0427 100644 --- a/sway/border.c +++ b/sway/border.c @@ -86,6 +86,8 @@ int get_font_text_height(const char *font) { cairo_t *cr = cairo_create(surface); int width, height; get_text_size(cr, font, &width, &height, "Gg"); + cairo_surface_destroy(surface); + cairo_destroy(cr); return height; } -- cgit v1.2.3