mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
fix memleaks - #150001
Original commit message from CVS: fix memleaks - #150001
This commit is contained in:
parent
fa2bc96eaa
commit
38ca60f6fe
5 changed files with 25 additions and 3 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2004-08-17 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
patch by: Luca Ognibene <skaboy81@virgilio.it>
|
||||
|
||||
* gst/gstcaps.c:
|
||||
* gst/gstelement.c:
|
||||
* gst/gstpad.c:
|
||||
* gst/gstxml.c:
|
||||
fix memleaks. Fixes #150001
|
||||
|
||||
2004-08-17 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||
|
||||
* docs/random/ds/0.9-suggested-changes:
|
||||
|
|
|
@ -976,8 +976,10 @@ gst_caps_subtract (const GstCaps * minuend, const GstCaps * subtrahend)
|
|||
gst_caps_append_structure (dest, gst_structure_copy (min));
|
||||
}
|
||||
}
|
||||
if (gst_caps_is_empty (dest))
|
||||
if (gst_caps_is_empty (dest)) {
|
||||
gst_caps_free (src);
|
||||
return dest;
|
||||
}
|
||||
}
|
||||
|
||||
gst_caps_free (src);
|
||||
|
|
|
@ -3220,6 +3220,8 @@ gst_element_restore_thyself (GstObject * object, xmlNodePtr self)
|
|||
/* FIXME: can this just be g_object_set ? */
|
||||
gst_util_set_object_arg (G_OBJECT (element), name, value);
|
||||
/* g_object_set (G_OBJECT (element), name, value, NULL); */
|
||||
g_free (name);
|
||||
g_free (value);
|
||||
}
|
||||
children = children->next;
|
||||
}
|
||||
|
|
|
@ -3002,11 +3002,13 @@ gst_pad_load_and_link (xmlNodePtr self, GstObject * parent)
|
|||
gchar **split;
|
||||
GstElement *target;
|
||||
GstObject *grandparent;
|
||||
gchar *name = NULL;
|
||||
|
||||
while (field) {
|
||||
if (!strcmp (field->name, "name")) {
|
||||
pad = gst_element_get_pad (GST_ELEMENT (parent),
|
||||
xmlNodeGetContent (field));
|
||||
name = xmlNodeGetContent (field);
|
||||
pad = gst_element_get_pad (GST_ELEMENT (parent), name);
|
||||
g_free (name);
|
||||
} else if (!strcmp (field->name, "peer")) {
|
||||
peer = xmlNodeGetContent (field);
|
||||
}
|
||||
|
@ -3023,8 +3025,11 @@ gst_pad_load_and_link (xmlNodePtr self, GstObject * parent)
|
|||
GST_CAT_DEBUG (GST_CAT_XML,
|
||||
"Could not parse peer '%s' for pad %s:%s, leaving unlinked",
|
||||
peer, GST_DEBUG_PAD_NAME (pad));
|
||||
|
||||
g_free (peer);
|
||||
return;
|
||||
}
|
||||
g_free (peer);
|
||||
|
||||
g_return_if_fail (split[0] != NULL);
|
||||
g_return_if_fail (split[1] != NULL);
|
||||
|
|
|
@ -415,6 +415,9 @@ gst_xml_make_element (xmlNodePtr cur, GstObject * parent)
|
|||
|
||||
g_return_val_if_fail (element != NULL, NULL);
|
||||
|
||||
g_free (type);
|
||||
g_free (name);
|
||||
|
||||
/* ne need to set the parent on this object bacause the pads */
|
||||
/* will go through the hierarchy to link to their peers */
|
||||
if (parent)
|
||||
|
|
Loading…
Reference in a new issue