[gnome-shell] st/icon: Fix GIcon leak in set_icon_name
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st/icon: Fix GIcon leak in set_icon_name
- Date: Wed, 22 Jan 2020 20:28:46 +0000 (UTC)
commit 6eacbeb203211471fa3381cfe5161abaa1d24153
Author: Sebastian Keller <skeller gnome org>
Date: Wed Jan 22 19:12:49 2020 +0100
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
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 aa98ed2236..70e4fb46cf 100644
--- a/src/st/st-icon.c
+++ b/src/st/st-icon.c
@@ -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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]