summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2022-02-10 12:12:36 +0100
committerraveit65 <[email protected]>2022-07-03 13:03:03 +0200
commite1ecada881e400c534a136135a48851c61ff3d1d (patch)
tree8f424eb8f79cebd017d6dc4e257c0de7135cc81f
parent6fb710b8042fffd1faa5564806d0df693b952417 (diff)
downloadcaja-e1ecada881e400c534a136135a48851c61ff3d1d.tar.bz2
caja-e1ecada881e400c534a136135a48851c61ff3d1d.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 e10889db..aeb3e05d 100644
--- a/libcaja-private/caja-bookmark.c
+++ b/libcaja-private/caja-bookmark.c
@@ -644,6 +644,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;
}