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:
Wim Taymans 2001-05-14 21:22:52 +00:00
parent 58085b9304
commit 5cb557dbf5

View file

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