mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +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>
|
2005-04-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
* gst/gstparent.c:
|
* gst/gstparent.c:
|
||||||
|
|
|
@ -849,15 +849,14 @@ load_plugin (xmlTextReaderPtr reader)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstPlugin *
|
static gboolean
|
||||||
load_paths (xmlTextReaderPtr reader, GstXMLRegistry * registry)
|
load_paths (xmlTextReaderPtr reader, GstXMLRegistry * registry)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
GstPlugin *plugin = g_new0 (GstPlugin, 1);
|
|
||||||
|
|
||||||
while ((ret = xmlTextReaderRead (reader)) == 1) {
|
while ((ret = xmlTextReaderRead (reader)) == 1) {
|
||||||
if (xmlTextReaderDepth (reader) == 1) {
|
if (xmlTextReaderDepth (reader) == 1) {
|
||||||
return plugin;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (xmlTextReaderNodeType (reader) == XML_READER_TYPE_ELEMENT &&
|
if (xmlTextReaderNodeType (reader) == XML_READER_TYPE_ELEMENT &&
|
||||||
xmlTextReaderDepth (reader) == 2) {
|
xmlTextReaderDepth (reader) == 2) {
|
||||||
|
@ -875,8 +874,7 @@ load_paths (xmlTextReaderPtr reader, GstXMLRegistry * registry)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (plugin);
|
return FALSE;
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue