mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
gstbin: Fix a potential leak in gst_bin_do_deep_add_remove()
If a child element of a bin is unparented while gst_bin_do_deep_add_remove() is iterating the children, don't leak a ref to it. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3101>
This commit is contained in:
parent
b7b4d93452
commit
8f91f1efe4
1 changed files with 2 additions and 1 deletions
|
@ -1142,8 +1142,9 @@ gst_bin_do_deep_add_remove (GstBin * bin, gint sig_id, const gchar * sig_name,
|
|||
" in bin %" GST_PTR_FORMAT, sig_name, e, parent);
|
||||
g_signal_emit (bin, sig_id, 0, parent, e);
|
||||
gst_object_unref (parent);
|
||||
gst_object_unref (e);
|
||||
}
|
||||
|
||||
gst_object_unref (e);
|
||||
}
|
||||
}
|
||||
gst_iterator_free (it);
|
||||
|
|
Loading…
Reference in a new issue