mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
element: NULL the lists of contexts in dispose()
If dispose() is called more than once, we may double unref the list of GstContext's. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/876>
This commit is contained in:
parent
e0a3af028f
commit
d2ba6b3c91
1 changed files with 1 additions and 0 deletions
|
@ -3385,6 +3385,7 @@ gst_element_dispose (GObject * object)
|
||||||
gst_object_replace ((GstObject **) clock_p, NULL);
|
gst_object_replace ((GstObject **) clock_p, NULL);
|
||||||
gst_object_replace ((GstObject **) bus_p, NULL);
|
gst_object_replace ((GstObject **) bus_p, NULL);
|
||||||
g_list_free_full (element->contexts, (GDestroyNotify) gst_context_unref);
|
g_list_free_full (element->contexts, (GDestroyNotify) gst_context_unref);
|
||||||
|
element->contexts = NULL;
|
||||||
GST_OBJECT_UNLOCK (element);
|
GST_OBJECT_UNLOCK (element);
|
||||||
|
|
||||||
GST_CAT_INFO_OBJECT (GST_CAT_REFCOUNTING, element, "%p parent class dispose",
|
GST_CAT_INFO_OBJECT (GST_CAT_REFCOUNTING, element, "%p parent class dispose",
|
||||||
|
|
Loading…
Reference in a new issue