GNOME Bugzilla – Bug 702837
dashdemux: Cleanup use of xmlFree vs g_free
Last modified: 2013-06-26 09:38:30 UTC
In several places in gstmpdparser.c, the code is using g_free() where it should be using xmlFree since the memory was allocated by the libxml2 library. I will provide a patch shortly.
Created attachment 247536 [details] [review] Proposed fix
Review of attachment 247536 [details] [review]: While the bug exists, this patch needs more work. Some of the variables that were switched to being freed by xmlFree were actually created using a g_strdup and should remain being freed with g_free. Also there is nothing in the xmlFree docs that says how it handles NULL values, while g_free handles it. So switching to xmlFree might also required an "if(variable) xmlFree(variable)"
Created attachment 247756 [details] [review] Updated fix based on comments This updated patch fixes the issues mentioned in Thiago's comments. It also addresses several other memory allocation/deallocation issues found during my subsequent review
Comment on attachment 247756 [details] [review] Updated fix based on comments Thanks, pushed.
Fixed by commit 45111f2efedd4df58525e93a19342bf306503cff