summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2022-02-10 12:12:36 +0100
committerVictor Kareh <[email protected]>2022-03-22 12:32:48 -0400
commitedee9dbcda52975afe110d6f3f2766b6b4724785 (patch)
treebf4e2d3d07c58b860be6fb26a58d818abf72cc61
parent79c84c1f216805d2fd87ccebf1e791cc61167d8a (diff)
downloadcaja-edee9dbcda52975afe110d6f3f2766b6b4724785.tar.bz2
caja-edee9dbcda52975afe110d6f3f2766b6b4724785.tar.xz
caja-bookmark: fix memory leak
-rw-r--r--libcaja-private/caja-bookmark.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcaja-private/caja-bookmark.c b/libcaja-private/caja-bookmark.c
index 0dd8116a..2aaaf5f3 100644
--- a/libcaja-private/caja-bookmark.c
+++ b/libcaja-private/caja-bookmark.c
@@ -642,6 +642,10 @@ caja_bookmark_menu_item_new (CajaBookmark *bookmark)
menu_item =
bookmark_image_menu_item_new_from_surface (surface,
bookmark->details->name);
+ if (surface != NULL)
+ {
+ cairo_surface_destroy (surface);
+ }
}
return menu_item;
}