1
0
mirror of https://gitlab.gnome.org/GNOME/nautilus synced 2024-06-30 23:46:35 +00:00

gtk/placessidebar: Fix leaks

The "start-icon" property is already set with the property bind between
the bookmark and the row in the same function, and the GIcon reference
generated by calling `nautilus_bookmark_get_symbolic_icon()` is not
dropped.
This commit is contained in:
Khalid Abu Shawarib 2024-06-16 13:58:11 +03:00
parent dcbd17359b
commit a926372a7c

View File

@ -1028,10 +1028,12 @@ update_places (NautilusGtkPlacesSidebar *sidebar)
row = add_place (sidebar, NAUTILUS_GTK_PLACES_BOOKMARK,
NAUTILUS_GTK_PLACES_SECTION_BOOKMARKS,
nautilus_bookmark_get_name (l->data),
nautilus_bookmark_get_symbolic_icon (l->data),
NULL,
NULL, mount_uri, NULL, NULL, NULL, NULL, index, tooltip);
g_object_bind_property (l->data, "symbolic-icon", row, "start-icon", G_BINDING_SYNC_CREATE);
index++;
g_free (tooltip);
}
/* Add new bookmark row */