st/icon: Fix GIcon leak in set_icon_name

set_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.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/2146
This commit is contained in:
Sebastian Keller 2020-01-22 19:12:49 +01:00
parent 84f490cceb
commit 6eacbeb203

View File

@ -549,7 +549,7 @@ void
st_icon_set_icon_name (StIcon *icon,
const gchar *icon_name)
{
GIcon *gicon = NULL;
g_autoptr(GIcon) gicon = NULL;
g_return_if_fail (ST_IS_ICON (icon));