dashdemux: Cleanup memory allocation/deallocation
authorGreg Rutz <greg@gsr-tek.com>
Tue, 25 Jun 2013 16:26:24 +0000 (10:26 -0600)
committerThiago Santos <thiago.sousa.santos@collabora.com>
Tue, 25 Jun 2013 23:53:17 +0000 (20:53 -0300)
commit45111f2efedd4df58525e93a19342bf306503cff
treed2e6e45773f0257c72434bcd7e161549dd6ef22d
parent358a68e65b29941900f71871bb4763f19f13aaf8
dashdemux: Cleanup memory allocation/deallocation

Ensure that g_free/xmlFree is used correctly based on how the
memory was allocated.

When deallocating GLists, there were many places that were using
g_list_foreach and g_list_free.  Converted these occurrences to
call g_list_free_full.

Add NULL checks to all xmlFree calls since the documentation does
not guarantee that passing NULL is safe

In places where we are strdup'ing memory allocated by libxml2,
changed those calls to use xmlMemStrdup().

There were several places where we were missing g_slice_free when
deallocating a top-level node structure.

https://bugzilla.gnome.org/show_bug.cgi?id=702837
ext/dash/gstmpdparser.c