Stable: 2.5.2
Development: 2.6-alpha3
Moc version: 2.6-alpha3
Leak 1
File: server.c
Function: on_song_change
Description: The function contains a static variable called on_song_change, that gets initialized with a call to lists_strs_new, but it is never freed.
Leak 2
File: common.c
Function: get_home
Description: The function contains a static variable called home, that gets initialized with a call to xstrdup, but it is never freed.
I tested with a debugger to check if the pointers ( of the variables mentioned above ) and the contents are still valid at exit, and they are, meaning that there never was a call to free.
A solution could be to declare the variables at file scope instead of function scope and free the contents on cleanup or shutdown.
jcf
Thu, 2025-07-31 08:27
Permalink
Thanks For Your Report
This is a piece of MOC code which I haven't been into in quite some time, so I'll need a little time to reacquiant myself with it. I do actually check for memory leakage before each release, so this may also indicate some detection issue there.
Thanks for the detail you have provided in your report; it makes my job a bit easier.