diff --git a/ChangeLog b/ChangeLog index 8068a56b2a..c94db1c2bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-04-13 Ronald S. Bultje + + * gst/registries/gstlibxmlregistry.c: (load_paths): + Fix memleak. + 2005-04-09 Ronald S. Bultje * gst/gstparent.c: diff --git a/gst/registries/gstlibxmlregistry.c b/gst/registries/gstlibxmlregistry.c index ef06ea2af5..b56238d5e3 100644 --- a/gst/registries/gstlibxmlregistry.c +++ b/gst/registries/gstlibxmlregistry.c @@ -849,15 +849,14 @@ load_plugin (xmlTextReaderPtr reader) return NULL; } -static GstPlugin * +static gboolean load_paths (xmlTextReaderPtr reader, GstXMLRegistry * registry) { int ret; - GstPlugin *plugin = g_new0 (GstPlugin, 1); while ((ret = xmlTextReaderRead (reader)) == 1) { if (xmlTextReaderDepth (reader) == 1) { - return plugin; + return TRUE; } if (xmlTextReaderNodeType (reader) == XML_READER_TYPE_ELEMENT && xmlTextReaderDepth (reader) == 2) { @@ -875,8 +874,7 @@ load_paths (xmlTextReaderPtr reader, GstXMLRegistry * registry) } } - g_free (plugin); - return NULL; + return FALSE; } static gboolean