places sidebar: Plug a small memory leak

_gtk_trash_moniotr_get_icon is transfer full, so we have
to unref the icon.
This commit is contained in:
Matthias Clasen
2016-03-27 10:59:59 -04:00
parent 5d83553beb
commit 8ff6d55c18

View File

@@ -893,8 +893,13 @@ static void
update_trash_icon (GtkPlacesSidebar *sidebar)
{
if (sidebar->trash_row)
gtk_sidebar_row_set_icon (GTK_SIDEBAR_ROW (sidebar->trash_row),
_gtk_trash_monitor_get_icon (sidebar->trash_monitor));
{
GIcon *icon;
icon = _gtk_trash_monitor_get_icon (sidebar->trash_monitor);
gtk_sidebar_row_set_icon (GTK_SIDEBAR_ROW (sidebar->trash_row), icon);
g_object_unref (icon);
}
}
static void