From b49023c31cd38036015a5e637f88f7e5bd2d8029 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Wed, 22 Jan 2020 23:34:23 +0100 Subject: [PATCH] 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 --- src/st/st-icon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/st/st-icon.c b/src/st/st-icon.c index 70e4fb46c..090ba4b10 100644 --- a/src/st/st-icon.c +++ b/src/st/st-icon.c @@ -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));