streams: Reset stream id field on finalize
authorEdward Hervey <edward@centricular.com>
Sat, 12 Nov 2022 08:57:18 +0000 (09:57 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Sat, 12 Nov 2022 09:33:50 +0000 (10:33 +0100)
If debugging is activated, the parent class finalize might attempt to read it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3390>

subprojects/gstreamer/gst/gststreams.c

index 1a02187..a6bf5d9 100644 (file)
@@ -191,6 +191,7 @@ gst_stream_finalize (GObject * object)
       (GstMiniObject *) NULL);
   gst_caps_replace (&stream->priv->caps, NULL);
   g_free ((gchar *) stream->stream_id);
+  stream->stream_id = NULL;
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }