summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}