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 b6b53fc19c
commit 5dabfa7b39

View File

@ -894,8 +894,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