aboutsummaryrefslogtreecommitdiff
path: root/sway/border.c
diff options
context:
space:
mode:
authorChang Liu <cliu712@aucklanduni.ac.nz>2016-04-12 11:11:26 +1200
committerChang Liu <cliu712@aucklanduni.ac.nz>2016-04-12 12:35:50 +1200
commit91d2a505b28f44f5d0fbb7fd63e9f56e74bf12eb (patch)
tree515f35605dc060fe8ce0ce4986b674acf4eef30e /sway/border.c
parent3b5a8cb40d4ab07aa9a72ba87660e4b9801afa21 (diff)
Plug two memory leaks
Plug two memory leaks introduced in the border drawing code.
Diffstat (limited to 'sway/border.c')
-rw-r--r--sway/border.c2
1 files changed, 2 insertions, 0 deletions
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;
}