1
1
mirror of https://github.com/swaywm/sway synced 2024-11-18 19:03:59 +01:00

Merge pull request #582 from cl91/fix-memory-leaks

Plug two memory leaks
This commit is contained in:
Drew DeVault 2016-04-11 21:08:44 -04:00
commit 9412dc7edf
2 changed files with 3 additions and 0 deletions

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

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