Bug 60482

Summary: PIM: check for memory leaks
Product: SyncEvolution Reporter: Patrick Ohly <patrick.ohly>
Component: SyncEvolutionAssignee: Patrick Ohly <patrick.ohly>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: highest CC: syncevolution-issues
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 55916    

Description Patrick Ohly 2013-02-08 09:54:48 UTC
testpim.py must use valgrind in the nightly testing. There have been leaks in some of the code which valgrind can report. Example:

==17726== 64 bytes in 2 blocks are definitely lost in loss record 4,109 of 6,887
==17726==    at 0x4C28BED: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17726==    by 0xDB95D50: g_malloc (gmem.c:159)
==17726==    by 0xDBAAC92: g_slice_alloc (gslice.c:1003)
==17726==    by 0xDBAB1E5: g_slice_alloc0 (gslice.c:1029)
==17726==    by 0xDB79B6A: g_date_time_alloc (gdatetime.c:432)
==17726==    by 0xDB79CE2: g_date_time_from_instant (gdatetime.c:528)
==17726==    by 0xDB7C3D3: g_date_time_to_utc (gdatetime.c:2077)
==17726==    by 0x11235C9: SyncEvo::DBus2PersonaDetails(GDBusCXX::ExtractArgs&, _GVariantIter&, SyncEvo::PersonaDetails&) (individual-traits.cpp:607)

            g_hash_table_insert(details.get(),
                                const_cast<gchar *>(folks_persona_store_detail_key(FOLKS_PERSONA_DETAIL_BIRTHDAY)),
                                new GValueDateTimeCXX(g_date_time_to_utc(local.get())));
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
returns an instance which is copied by GValueDateTimeCXX instead of taking ownership.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.