[gnome-todo] task-list: don't leak GdkRGBA color
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] task-list: don't leak GdkRGBA color
- Date: Thu, 29 Sep 2016 22:22:15 +0000 (UTC)
commit 0a267397129f1231c86e67573b252b420aa5e48f
Author: Victor Toso <me victortoso com>
Date: Thu Sep 29 22:17:58 2016 +0200
task-list: don't leak GdkRGBA color
192 bytes in 6 blocks are definitely lost in loss record 15,388 of 16,885
at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
by 0xA1F890E: g_malloc (gmem.c:94)
by 0xA212A55: g_slice_alloc (gslice.c:1025)
by 0xA212AD7: g_slice_copy (gslice.c:1076)
by 0x678E912: gdk_rgba_copy (gdkrgba.c:76)
by 0x423910: gtd_task_list_get_color (gtd-task-list.c:306)
by 0x4233DD: gtd_task_list_get_property (gtd-task-list.c:83)
by 0x9D5717E: object_get_property (gobject.c:1378)
by 0x9D59E7F: g_object_get_property (gobject.c:2446)
by 0x9D49E90: on_source_notify (gbinding.c:316)
by 0x9D53F16: g_cclosure_marshal_VOID__PARAM (gmarshal.c:1832)
by 0x9D4F8B9: g_closure_invoke (gclosure.c:804)
https://bugzilla.gnome.org/show_bug.cgi?id=772212
src/gtd-task-list.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/gtd-task-list.c b/src/gtd-task-list.c
index 5fee618..976af8c 100644
--- a/src/gtd-task-list.c
+++ b/src/gtd-task-list.c
@@ -80,8 +80,12 @@ gtd_task_list_get_property (GObject *object,
switch (prop_id)
{
case PROP_COLOR:
- g_value_set_boxed (value, gtd_task_list_get_color (self));
- break;
+ {
+ GdkRGBA *color = gtd_task_list_get_color (self);
+ g_value_set_boxed (value, color);
+ gdk_rgba_free (color);
+ break;
+ }
case PROP_IS_REMOVABLE:
g_value_set_boolean (value, gtd_task_list_is_removable (self));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]