[nautilus/wip/antoniof/meets-valgrind: 6/16] window-slot: Don't leak icon reference
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/meets-valgrind: 6/16] window-slot: Don't leak icon reference
- Date: Tue, 5 Jan 2021 08:50:26 +0000 (UTC)
commit 76b8abd8725b3711fdb520a600a9d29e03aa7bd2
Author: António Fernandes <antoniof gnome org>
Date: Sat Dec 19 13:20:59 2020 +0000
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.
src/nautilus-window-slot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]