After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772272 - Fix (some) leaks
Fix (some) leaks
Status: RESOLVED FIXED
Product: gnome-calendar
Classification: Applications
Component: General
unspecified
Other All
: Normal normal
: 3.26
Assigned To: GNOME Calendar maintainers
GNOME Calendar maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-30 23:24 UTC by Victor Toso
Modified: 2017-04-17 18:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
date-chooser: Fix leak of GDateTime (1.54 KB, patch)
2016-09-30 23:24 UTC, Victor Toso
committed Details | Review
event: Fix leak of alarm (GHashTable) (1.51 KB, patch)
2016-09-30 23:24 UTC, Victor Toso
committed Details | Review
event: Fix leak of EcalComponentId (1.39 KB, patch)
2016-09-30 23:24 UTC, Victor Toso
committed Details | Review
event: Fix leak of uid (string) (1.48 KB, patch)
2016-09-30 23:25 UTC, Victor Toso
committed Details | Review
event: Fix leak of GdkRGBA (1.43 KB, patch)
2016-09-30 23:25 UTC, Victor Toso
committed Details | Review
time-selector: Fix GDateTime leak (2.23 KB, patch)
2016-09-30 23:25 UTC, Victor Toso
committed Details | Review
date-chooser: Fix GDateTime leak (2.21 KB, patch)
2016-09-30 23:25 UTC, Victor Toso
committed Details | Review

Description Victor Toso 2016-09-30 23:24:26 UTC
There are a few more... to be fixed another time :)
Comment 1 Victor Toso 2016-09-30 23:24:31 UTC
Created attachment 336705 [details] [review]
date-chooser: Fix leak of GDateTime

264,180 (1,920 direct, 262,260 indirect) bytes in 60 blocks are definitely lost in loss record 18,487 of 18,509
   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
   by 0x9A0C90E: g_malloc (gmem.c:94)
   by 0x9A26A55: g_slice_alloc (gslice.c:1025)
   by 0x9A26A95: g_slice_alloc0 (gslice.c:1051)
   by 0x99E8DC4: g_date_time_alloc (gdatetime.c:428)
   by 0x99E95C1: g_date_time_new (gdatetime.c:957)
   by 0x99E97B2: g_date_time_new_local (gdatetime.c:1012)
   by 0x42481C: calendar_compute_days (gcal-date-chooser.c:150)
   by 0x425F3B: gcal_date_chooser_set_date (gcal-date-chooser.c:743)
   by 0x4251CD: multi_choice_changed (gcal-date-chooser.c:420)
   by 0x9567F16: g_cclosure_marshal_VOID__PARAM (gmarshal.c:1832)
   by 0x95638B9: g_closure_invoke (gclosure.c:804)
Comment 2 Victor Toso 2016-09-30 23:24:42 UTC
Created attachment 336707 [details] [review]
event: Fix leak of alarm (GHashTable)

105,858 (42,064 direct, 63,794 indirect) bytes in 478 blocks are definitely lost in loss record 19,065 of 19,103
   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
   by 0x9A0C90E: g_malloc (gmem.c:94)
   by 0x9A26A55: g_slice_alloc (gslice.c:1025)
   by 0x99F0510: g_hash_table_new_full (ghash.c:711)
   by 0x42B10C: gcal_event_init (gcal-event.c:657)
   by 0x9584B32: g_type_create_instance (gtype.c:1866)
   by 0x956BED0: g_object_new_internal (gobject.c:1783)
   by 0x956CB24: g_object_new_valist (gobject.c:2042)
   by 0x878945D: g_initable_new_valist (ginitable.c:224)
   by 0x878933A: g_initable_new (ginitable.c:146)
   by 0x42B181: gcal_event_new (gcal-event.c:690)
   by 0x4549CA: gcal_year_view_component_added (gcal-year-view.c:1632)
Comment 3 Victor Toso 2016-09-30 23:24:57 UTC
Created attachment 336708 [details] [review]
event: Fix leak of EcalComponentId

29,717 (8,128 direct, 21,589 indirect) bytes in 508 blocks are definitely lost in loss record 18,380 of 18,445
   at 0x4C2FA50: calloc (vg_replace_malloc.c:711)
   by 0x9A0C981: g_malloc0 (gmem.c:124)
   by 0x9A0CC64: g_malloc0_n (gmem.c:355)
   by 0x5BE3948: e_cal_component_get_id (e-cal-component.c:1477)
   by 0x42A06D: gcal_event_update_uid_internal (gcal-event.c:178)
   by 0x42A64D: gcal_event_set_component_internal (gcal-event.c:310)
   by 0x42AD0F: gcal_event_set_property (gcal-event.c:459)
   by 0x956B39B: object_set_property (gobject.c:1423)
   by 0x956BFDF: g_object_new_internal (gobject.c:1817)
   by 0x956CB24: g_object_new_valist (gobject.c:2042)
   by 0x878945D: g_initable_new_valist (ginitable.c:224)
   by 0x878933A: g_initable_new (ginitable.c:146)
Comment 4 Victor Toso 2016-09-30 23:25:03 UTC
Created attachment 336709 [details] [review]
event: Fix leak of uid (string)

28,337 bytes in 415 blocks are definitely lost in loss record 18,432 of 18,507
   at 0x4C2FC47: realloc (vg_replace_malloc.c:785)
   by 0xA88021D: vasprintf (in /usr/lib64/libc-2.24.so)
   by 0x9A593FC: g_vasprintf (gprintf.c:316)
   by 0x9A292F7: g_strdup_vprintf (gstrfuncs.c:514)
   by 0x9A2939C: g_strdup_printf (gstrfuncs.c:540)
   by 0x42A10B: gcal_event_update_uid_internal (gcal-event.c:192)
   by 0x42BF52: gcal_event_set_source (gcal-event.c:1217)
   by 0x42ADCA: gcal_event_set_property (gcal-event.c:480)
   by 0x956B39B: object_set_property (gobject.c:1423)
   by 0x956BFDF: g_object_new_internal (gobject.c:1817)
   by 0x956CB24: g_object_new_valist (gobject.c:2042)
   by 0x878945D: g_initable_new_valist (ginitable.c:224)
Comment 5 Victor Toso 2016-09-30 23:25:08 UTC
Created attachment 336710 [details] [review]
event: Fix leak of GdkRGBA

23,776 bytes in 743 blocks are definitely lost in loss record 19,053 of 19,159
   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
   by 0x9A0C90E: g_malloc (gmem.c:94)
   by 0x9A26A55: g_slice_alloc (gslice.c:1025)
   by 0x9A26AD7: g_slice_copy (gslice.c:1076)
   by 0x6A97912: gdk_rgba_copy (gdkrgba.c:76)
   by 0x42B35E: gcal_event_set_color (gcal-event.c:750)
   by 0x42BF3E: gcal_event_set_source (gcal-event.c:1204)
   by 0x42AE20: gcal_event_set_property (gcal-event.c:481)
   by 0x956B39B: object_set_property (gobject.c:1423)
   by 0x956BFDF: g_object_new_internal (gobject.c:1817)
   by 0x956CB24: g_object_new_valist (gobject.c:2042)
   by 0x878945D: g_initable_new_valist (ginitable.c:224)
Comment 6 Victor Toso 2016-09-30 23:25:13 UTC
Created attachment 336711 [details] [review]
time-selector: Fix GDateTime leak

By using finalize and dispose methods and calling the proper free
methods calls.

8,806 (64 direct, 8,742 indirect) bytes in 2 blocks are definitely lost in loss record 18,367 of 18,534
   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
   by 0x9A0C90E: g_malloc (gmem.c:94)
   by 0x9A26A55: g_slice_alloc (gslice.c:1025)
   by 0x9A26A95: g_slice_alloc0 (gslice.c:1051)
   by 0x99E8DC4: g_date_time_alloc (gdatetime.c:428)
   by 0x99E8FA3: g_date_time_from_instant (gdatetime.c:524)
   by 0x99E933F: g_date_time_new_from_timeval (gdatetime.c:647)
   by 0x99E93A5: g_date_time_new_now (gdatetime.c:705)
   by 0x99E93C4: g_date_time_new_now_local (gdatetime.c:728)
   by 0x445BED: gcal_time_selector_init (gcal-time-selector.c:249)
   by 0x9584B32: g_type_create_instance (gtype.c:1866)
   by 0x956BED0: g_object_new_internal (gobject.c:1783)
Comment 7 Victor Toso 2016-09-30 23:25:19 UTC
Created attachment 336712 [details] [review]
date-chooser: Fix GDateTime leak

By using finalize and dispose methods and calling the proper free method.

8,806 (64 direct, 8,742 indirect) bytes in 2 blocks are definitely lost in loss record 18,051 of 18,131
   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
   by 0x9A0C90E: g_malloc (gmem.c:94)
   by 0x9A26A55: g_slice_alloc (gslice.c:1025)
   by 0x9A26A95: g_slice_alloc0 (gslice.c:1051)
   by 0x99E8DC4: g_date_time_alloc (gdatetime.c:428)
   by 0x99E95C1: g_date_time_new (gdatetime.c:957)
   by 0x99E97B2: g_date_time_new_local (gdatetime.c:1012)
   by 0x4251F4: multi_choice_changed (gcal-date-chooser.c:419)
   by 0x9567F16: g_cclosure_marshal_VOID__PARAM (gmarshal.c:1832)
   by 0x95638B9: g_closure_invoke (gclosure.c:804)
   by 0x957FD25: signal_emit_unlocked_R (gsignal.c:3635)
   by 0x957F05C: g_signal_emit_valist (gsignal.c:3391)
Comment 8 Georges Basile Stavracas Neto 2016-10-01 22:19:41 UTC
Thanks!

Attachment 336705 [details] pushed as 705d980 - date-chooser: Fix leak of GDateTime
Attachment 336707 [details] pushed as aee120b - event: Fix leak of alarm (GHashTable)
Attachment 336708 [details] pushed as 86d91b7 - event: Fix leak of EcalComponentId
Attachment 336709 [details] pushed as ea70173 - event: Fix leak of uid (string)
Attachment 336710 [details] pushed as 03d1e54 - event: Fix leak of GdkRGBA
Attachment 336711 [details] pushed as f713a90 - time-selector: Fix GDateTime leak
Attachment 336712 [details] pushed as 52a9864 - date-chooser: Fix GDateTime leak