GNOME Bugzilla – Bug 773606
Fix some more leaks
Last modified: 2016-10-28 19:38:11 UTC
yay o/
Created attachment 338646 [details] [review] panel-today: fix leak of GDateTime 26,418 (192 direct, 26,226 indirect) bytes in 6 blocks are definitely lost in loss record 16,070 of 16,088 at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) by 0xA5229D5: g_malloc (gmem.c:94) by 0xA53CB3D: g_slice_alloc (gslice.c:1025) by 0xA53CB7D: g_slice_alloc0 (gslice.c:1051) by 0xA4FEE8B: g_date_time_alloc (gdatetime.c:428) by 0xA4FF06A: g_date_time_from_instant (gdatetime.c:524) by 0xA4FF406: g_date_time_new_from_timeval (gdatetime.c:647) by 0xA4FF46C: g_date_time_new_now (gdatetime.c:705) by 0xA4FF48B: g_date_time_new_now_local (gdatetime.c:728) by 0x4367CF: is_today (gtd-panel-today.c:64) by 0x436915: gtd_panel_today_count_tasks (gtd-panel-today.c:106) by 0xA07D61B: g_cclosure_marshal_VOID__OBJECT (gmarshal.c:2062) Signed-off-by: Victor Toso <victortoso@redhat.com>
Created attachment 338647 [details] [review] gtd-task: Fix leak of ECalComponentDateTime As the document states on e_cal_component_get_due: "Return value for the due date/time. This should be freed with the e_cal_component_free_datetime() function." 3,168 bytes in 66 blocks are definitely lost in loss record 15,883 of 16,044 at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) by 0xA5229D5: g_malloc (gmem.c:94) by 0xA522CB7: g_malloc_n (gmem.c:331) by 0x5BE62D6: get_datetime (e-cal-component.c:2515) by 0x5BE70B7: e_cal_component_get_due (e-cal-component.c:2841) by 0x4259A3: gtd_task_get_due_date (gtd-task.c:949) by 0x435A61: gtd_panel_scheduled_count_tasks (gtd-panel-scheduled.c:311) Signed-off-by: Victor Toso <victortoso@redhat.com>
Created attachment 338648 [details] [review] gtd-panel-today: fix leak of GDateTime 1,920 bytes in 60 blocks are definitely lost in loss record 15,758 of 16,018 at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) by 0xA5229D5: g_malloc (gmem.c:94) by 0xA53CB3D: g_slice_alloc (gslice.c:1025) by 0xA53CB7D: g_slice_alloc0 (gslice.c:1051) by 0xA4FEE8B: g_date_time_alloc (gdatetime.c:428) by 0xA4FF688: g_date_time_new (gdatetime.c:957) by 0xA4FF8DF: g_date_time_new_utc (gdatetime.c:1049) by 0x42468C: gtd_task__convert_icaltime (gtd-task.c:190) by 0x4259AF: gtd_task_get_due_date (gtd-task.c:952) by 0x436922: gtd_panel_today_count_tasks (gtd-panel-today.c:105) Signed-off-by: Victor Toso <victortoso@redhat.com>
Created attachment 338649 [details] [review] gtd-task: Fix leak of due-date property 288 bytes in 9 blocks are definitely lost in loss record 15,018 of 16,013 at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) by 0xA5229D5: g_malloc (gmem.c:94) by 0xA53CB3D: g_slice_alloc (gslice.c:1025) by 0xA53CB7D: g_slice_alloc0 (gslice.c:1051) by 0xA4FEE8B: g_date_time_alloc (gdatetime.c:428) by 0xA4FF688: g_date_time_new (gdatetime.c:957) by 0xA4FF8DF: g_date_time_new_utc (gdatetime.c:1049) by 0x42468C: gtd_task__convert_icaltime (gtd-task.c:190) by 0x4259AF: gtd_task_get_due_date (gtd-task.c:952) by 0x424C25: gtd_task_get_property (gtd-task.c:375) by 0xA0804F0: object_get_property (gobject.c:1378) by 0xA08323F: g_object_get_property (gobject.c:2446) Signed-off-by: Victor Toso <victortoso@redhat.com>
Created attachment 338650 [details] [review] panel-schedule: free GList on finalize 192 (24 direct, 168 indirect) bytes in 1 blocks are definitely lost in loss record 14,713 of 16,007 at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) by 0xA5229D5: g_malloc (gmem.c:94) by 0xA53CB3D: g_slice_alloc (gslice.c:1025) by 0xA5163CF: g_list_prepend (glist.c:311) by 0x435AB6: gtd_panel_scheduled_count_tasks (gtd-panel-scheduled.c:319) by 0xA07D61B: g_cclosure_marshal_VOID__OBJECT (gmarshal.c:2062) by 0xA078997: g_closure_invoke (gclosure.c:804) by 0xA095EC0: signal_emit_unlocked_R (gsignal.c:3635) by 0xA0951F7: g_signal_emit_valist (gsignal.c:3391) by 0xA095739: g_signal_emit (gsignal.c:3447) by 0x411527: gtd_manager__task_list_modified (gtd-manager.c:374) Signed-off-by: Victor Toso <victortoso@redhat.com>
Created attachment 338651 [details] [review] list-selector-panel: fix GMenu leak 761 (48 direct, 713 indirect) bytes in 1 blocks are definitely lost in loss record 16,318 of 16,889 at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) by 0xA5229D5: g_malloc (gmem.c:94) by 0xA53CB3D: g_slice_alloc (gslice.c:1025) by 0xA53CB7D: g_slice_alloc0 (gslice.c:1051) by 0xA09AC0A: g_type_create_instance (gtype.c:1848) by 0xA081290: g_object_new_internal (gobject.c:1783) by 0xA08179F: g_object_newv (gobject.c:1930) by 0xA080E41: g_object_new (gobject.c:1623) by 0x90B7FC0: g_menu_new (gmenu.c:249) by 0x41DF69: gtd_list_selector_panel_init (gtd-list-selector-panel.c:698) by 0xA09ACCD: g_type_create_instance (gtype.c:1866) by 0xA081290: g_object_new_internal (gobject.c:1783) Signed-off-by: Victor Toso <victortoso@redhat.com>
Review of attachment 338646 [details] [review]: LGTM.
Review of attachment 338647 [details] [review]: Nice catch.
Review of attachment 338648 [details] [review]: Wrong coding style used. ::: plugins/today-panel/gtd-panel-today.c @@ +106,3 @@ + if (!is_today (task_dt)) { + g_clear_pointer (&task_dt, g_date_time_unref); Please use the GNU C Coding Style brackets.
Review of attachment 338649 [details] [review]: Nitpicks. ::: src/gtd-task.c @@ +377,3 @@ + g_value_set_boxed (value, date); + g_date_time_unref (date); + } Put the 'date' var outside the switch. Use g_clear_pointer().
Review of attachment 338650 [details] [review]: LGTM.
Review of attachment 338651 [details] [review]: LGTM.
Attachment 338646 [details] pushed as 15cd8f5 - panel-today: fix leak of GDateTime Attachment 338647 [details] pushed as ac5a675 - gtd-task: Fix leak of ECalComponentDateTime Attachment 338650 [details] pushed as c74fa29 - panel-schedule: free GList on finalize Attachment 338651 [details] pushed as 1a1d3d9 - list-selector-panel: fix GMenu leak
Created attachment 338744 [details] [review] gtd-task: Fix leak of due-date property 288 bytes in 9 blocks are definitely lost in loss record 15,018 of 16,013 at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) by 0xA5229D5: g_malloc (gmem.c:94) by 0xA53CB3D: g_slice_alloc (gslice.c:1025) by 0xA53CB7D: g_slice_alloc0 (gslice.c:1051) by 0xA4FEE8B: g_date_time_alloc (gdatetime.c:428) by 0xA4FF688: g_date_time_new (gdatetime.c:957) by 0xA4FF8DF: g_date_time_new_utc (gdatetime.c:1049) by 0x42468C: gtd_task__convert_icaltime (gtd-task.c:190) by 0x4259AF: gtd_task_get_due_date (gtd-task.c:952) by 0x424C25: gtd_task_get_property (gtd-task.c:375) by 0xA0804F0: object_get_property (gobject.c:1378) by 0xA08323F: g_object_get_property (gobject.c:2446) Signed-off-by: Victor Toso <victortoso@redhat.com>
Created attachment 338745 [details] [review] gtd-panel-today: fix leak of GDateTime 1,920 bytes in 60 blocks are definitely lost in loss record 15,758 of 16,018 at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) by 0xA5229D5: g_malloc (gmem.c:94) by 0xA53CB3D: g_slice_alloc (gslice.c:1025) by 0xA53CB7D: g_slice_alloc0 (gslice.c:1051) by 0xA4FEE8B: g_date_time_alloc (gdatetime.c:428) by 0xA4FF688: g_date_time_new (gdatetime.c:957) by 0xA4FF8DF: g_date_time_new_utc (gdatetime.c:1049) by 0x42468C: gtd_task__convert_icaltime (gtd-task.c:190) by 0x4259AF: gtd_task_get_due_date (gtd-task.c:952) by 0x436922: gtd_panel_today_count_tasks (gtd-panel-today.c:105) Signed-off-by: Victor Toso <victortoso@redhat.com>
Review of attachment 338744 [details] [review]: LGTM
Review of attachment 338745 [details] [review]: LGTM
Attachment 338744 [details] pushed as a8a764c - gtd-task: Fix leak of due-date property Attachment 338745 [details] pushed as 67a1ced - gtd-panel-today: fix leak of GDateTime