mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
gst/registries/gstlibxmlregistry.c: Fix memleak.
Original commit message from CVS: * gst/registries/gstlibxmlregistry.c: (load_paths): Fix memleak.
This commit is contained in:
parent
3003cbf026
commit
418c32e600
2 changed files with 8 additions and 5 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue