Closed root-hardenedvault closed 3 years ago
hi @root-hardenedvault, thanks once again for your contribution :slightly_smiling_face:
i still remember trying to find out whether free()
and g_free()
are interchangeable and concluded that they are, but now every search result points towards the opposite. weird, i wonder how i ended up at that conclusion :grimacing:
good thing you caught both of these things. could you fix the missing semicolon at the end of line 502 (as the CI pointed out) so i can merge?
Fixed. The codecov report shouldn't bothers?
thanks! yeah, just ignore the codecov stuff. i need to configure it better.
g_free() of libglib is not interchangeable with free() of libc, if glib is built with ENABLE_MEM_PROFILE or ENABLE_MEM_CHECK defined, so memory allocated with g_malloc() family should be released with g_free() rather than free(), as https://mail.gnome.org/archives/gtk-list/2000-July/msg00002.html pointed out.
the return value of xmlnode_to_str() should be released with g_free(), otherwise it is leaked.
Signed-off-by: HardenedVault root@hardenedvault.net