summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2020-12-19 13:20:59 +0000
committerAntónio Fernandes <antoniof@gnome.org>2020-12-19 18:53:13 +0000
commit73daad58ef9e55f15c8bc697d1614aab18ebad29 (patch)
treeff5578d6ee405b80f396b9af7ff44dd950856bbc
parentde4573272f5d7619bf3472a7ef4e9a183abe72b1 (diff)
downloadnautilus-73daad58ef9e55f15c8bc697d1614aab18ebad29.tar.gz
window-slot: Don't leak icon reference
g_value_set_object() increases the reference count of the passed object But we already own a reference, so we end up leaking it. Use g_value_take_object() to reuse the owned reference instead. Leak found in valgrind file provided by nekohayo
-rw-r--r--src/nautilus-window-slot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index b5ff00008..32a3590a3 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -911,7 +911,7 @@ nautilus_window_slot_get_property (GObject *object,
case PROP_ICON:
{
- g_value_set_object (value, nautilus_window_slot_get_icon (self));
+ g_value_take_object (value, nautilus_window_slot_get_icon (self));
}
break;