[gnome-todo] eds: don't leak panels



commit 4f291748d9750759e2d9bd378d60532817db9554
Author: Victor Toso <me victortoso com>
Date:   Thu Sep 29 18:02:52 2016 +0200

    eds: don't leak panels
    
    and fix dangling pointers
    
    47 bytes in 1 blocks are definitely lost in loss record 8,461 of 16,914
       at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
       by 0xA9E5247: vasprintf (in /usr/lib64/libc-2.24.so)
       by 0xA25A3FC: g_vasprintf (gprintf.c:316)
       by 0xA22A2F7: g_strdup_vprintf (gstrfuncs.c:514)
       by 0xA22A39C: g_strdup_printf (gstrfuncs.c:540)
       by 0x4263DD: gtd_task_list_view_set_task_list (gtd-task-list-view.c:1097)
       by 0x42D3CF: gtd_panel_today_init (gtd-panel-today.c:329)
       by 0x9D85B32: g_type_create_instance (gtype.c:1866)
       by 0x9D6CED0: g_object_new_internal (gobject.c:1783)
       by 0x9D6D3DF: g_object_newv (gobject.c:1930)
       by 0x9D6CA81: g_object_new (gobject.c:1623)
       by 0x42D471: gtd_panel_today_new (gtd-panel-today.c:344)
    
    47 bytes in 1 blocks are definitely lost in loss record 8,462 of 16,914
       at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
       by 0xA9E5247: vasprintf (in /usr/lib64/libc-2.24.so)
       by 0xA25A3FC: g_vasprintf (gprintf.c:316)
       by 0xA22A2F7: g_strdup_vprintf (gstrfuncs.c:514)
       by 0xA22A39C: g_strdup_printf (gstrfuncs.c:540)
       by 0x4263DD: gtd_task_list_view_set_task_list (gtd-task-list-view.c:1097)
       by 0x42E738: gtd_panel_scheduled_init (gtd-panel-scheduled.c:504)
       by 0x9D85B32: g_type_create_instance (gtype.c:1866)
       by 0x9D6CED0: g_object_new_internal (gobject.c:1783)
       by 0x9D6D3DF: g_object_newv (gobject.c:1930)
       by 0x9D6CA81: g_object_new (gobject.c:1623)
       by 0x42E820: gtd_panel_scheduled_new (gtd-panel-scheduled.c:524)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=772212

 plugins/eds/gtd-plugin-eds.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/eds/gtd-plugin-eds.c b/plugins/eds/gtd-plugin-eds.c
index 5dd1671..606065e 100644
--- a/plugins/eds/gtd-plugin-eds.c
+++ b/plugins/eds/gtd-plugin-eds.c
@@ -304,7 +304,11 @@ gtd_plugin_eds_finalize (GObject *object)
 {
   GtdPluginEds *self = (GtdPluginEds *)object;
 
+  g_list_free_full (self->panels, g_object_unref);
+  self->panels = NULL;
+
   g_list_free_full (self->providers, g_object_unref);
+  self->providers = NULL;
 
   G_OBJECT_CLASS (gtd_plugin_eds_parent_class)->finalize (object);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]