mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-12 03:16:33 +00:00
fixed a mem leak in the destroy code.
Original commit message from CVS: fixed a mem leak in the destroy code.
This commit is contained in:
parent
58085b9304
commit
5cb557dbf5
1 changed files with 3 additions and 2 deletions
|
@ -905,13 +905,14 @@ gst_element_real_destroy (GtkObject *object)
|
|||
GST_DEBUG_ELEMENT (GST_CAT_REFCOUNTING, element, "destroy\n");
|
||||
|
||||
if (element->pads) {
|
||||
pads = g_list_copy (element->pads);
|
||||
GList *orig;
|
||||
orig = pads = g_list_copy (element->pads);
|
||||
while (pads) {
|
||||
pad = GST_PAD (pads->data);
|
||||
gst_object_unparent (GST_OBJECT (pad));
|
||||
pads = g_list_next (pads);
|
||||
}
|
||||
g_list_free (pads);
|
||||
g_list_free (orig);
|
||||
}
|
||||
|
||||
g_list_free (element->pads);
|
||||
|
|
Loading…
Reference in a new issue