diff options
author | Matthew Waters <matthew@centricular.com> | 2021-08-27 06:51:07 +0300 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2021-08-28 14:25:49 +0300 |
commit | 3991afe68b7c731f02c3e61f6e31b56507a8c595 (patch) | |
tree | bb1a9414415071772b1c715383cec47755cb6be2 | |
parent | f5beb2da840b2432b46c36b9ea54bbe426ffaed8 (diff) |
element: NULL the lists of contexts in dispose()1.14
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/878>
-rw-r--r-- | gst/gstelement.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gst/gstelement.c b/gst/gstelement.c index 8a908a1a5a..25f2a0fd6e 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -3291,6 +3291,7 @@ gst_element_dispose (GObject * object) gst_object_replace ((GstObject **) clock_p, NULL); gst_object_replace ((GstObject **) bus_p, NULL); g_list_free_full (element->contexts, (GDestroyNotify) gst_context_unref); + element->contexts = NULL; GST_OBJECT_UNLOCK (element); GST_CAT_INFO_OBJECT (GST_CAT_REFCOUNTING, element, "%p parent class dispose", |