gst/registries/gstlibxmlregistry.c: Fix memleak.

Original commit message from CVS:
* gst/registries/gstlibxmlregistry.c: (load_paths):
Fix memleak.
This commit is contained in:
Ronald S. Bultje 2005-04-13 20:54:07 +00:00
parent 3003cbf026
commit 418c32e600
2 changed files with 8 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2005-04-13 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/registries/gstlibxmlregistry.c: (load_paths):
Fix memleak.
2005-04-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/gstparent.c:

View file

@ -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