mate-desktop / mate-settings-daemon

MATE settings daemon
https://mate-desktop.org
GNU General Public License v2.0
43 stars 48 forks source link

datetime: fix memory leak #374

Closed rbuj closed 2 years ago

rbuj commented 3 years ago
CC=gcc CFLAGS="-ggdb3 -O0 -fsanitize=address" LDFLAGS="-fsanitize=address"  ./autogen.sh --prefix=/usr --enable-debug  --enable-compile-warnings=maximum && make &> make.log && sudo make install
LeakSanitizer: detected memory leaks
Direct leak of 7 byte(s) in 1 object(s) allocated from:
    #0 0x7f7e2094393f in __interceptor_malloc (/lib64/libasan.so.6+0xae93f)
    #1 0x7f7e1f867b7f in g_malloc ../glib/gmem.c:106
    #2 0x7f7e1f867ec2 in g_malloc_n ../glib/gmem.c:344
    #3 0x7f7e1f88a1a5 in g_strdup ../glib/gstrfuncs.c:364
    #4 0x4068b5 in check_can_do /home/robert/builddir.gcc/mate-settings-daemon/plugins/datetime/msd-datetime-mechanism.c:596
    #5 0x406ae0 in msd_datetime_mechanism_can_set_time /home/robert/builddir.gcc/mate-settings-daemon/plugins/datetime/msd-datetime-mechanism.c:633
    #6 0x7f7e1f9782bf in g_cclosure_marshal_VOID__POINTER ../gobject/gmarshal.c:1744
    #7 0x7f7e1fa25fe3 in object_registration_message (/lib64/libdbus-glib-1.so.2+0xffe3)
    #8 0x6040000031cf  (<unknown module>)
SUMMARY: AddressSanitizer: 7 byte(s) leaked in 1 allocation(s).
rbuj commented 2 years ago

@mbkma the migration to gdbus is in another thread #324

mbkma commented 2 years ago

ok, 2 approvals, merging...