summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2022-02-10 12:12:36 +0100
committerraveit65 <[email protected]>2022-07-21 19:35:21 +0200
commit23d4907f4a2b4692daa868b47eab2a2b0c90cede (patch)
tree1262ced06b5c766c638aef66e91dd7e7ffbb9eb1
parent74a2805e4dd922f173b82b7710b480e4560a4d49 (diff)
downloadcaja-23d4907f4a2b4692daa868b47eab2a2b0c90cede.tar.bz2
caja-23d4907f4a2b4692daa868b47eab2a2b0c90cede.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 937f2ec4..0c8c3ecd 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;
}