st/icon: Fix GIcon leak in set_fallback_icon_name

set_fallback_icon_name() leaks a GIcon by using the set_icon method
which adds a ref to the GIcon without removing its own ref after calling
the method.

Related to https://gitlab.gnome.org/GNOME/gnome-shell/issues/2146
This commit is contained in:
Sebastian Keller 2020-01-22 23:34:23 +01:00
parent 9e9f3ff6b4
commit b49023c31c

View File

@ -726,7 +726,7 @@ void
st_icon_set_fallback_icon_name (StIcon *icon,
const gchar *fallback_icon_name)
{
GIcon *gicon = NULL;
g_autoptr(GIcon) gicon = NULL;
g_return_if_fail (ST_IS_ICON (icon));