diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-04-11 21:08:44 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2016-04-11 21:08:44 -0400 |
commit | 9412dc7edf29073f069e48a266910ac3c4436170 (patch) | |
tree | 515f35605dc060fe8ce0ce4986b674acf4eef30e /sway | |
parent | 3b5a8cb40d4ab07aa9a72ba87660e4b9801afa21 (diff) | |
parent | 91d2a505b28f44f5d0fbb7fd63e9f56e74bf12eb (diff) |
Merge pull request #582 from cl91/fix-memory-leaks
Plug two memory leaks
Diffstat (limited to 'sway')
-rw-r--r-- | sway/border.c | 2 | ||||
-rw-r--r-- | sway/container.c | 1 |
2 files changed, 3 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; } diff --git a/sway/container.c b/sway/container.c index 6dfc608d..a4b2d1c2 100644 --- a/sway/container.c +++ b/sway/container.c @@ -64,6 +64,7 @@ static void free_swayc(swayc_t *cont) { if (cont->bg_pid != 0) { terminate_swaybg(cont->bg_pid); } + free(cont->border); free(cont); } |