From d252ab2e0665c9d2d7c891a3c68bd7d45c9b5e7a Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 26 Feb 2021 15:36:48 -0300 Subject: [PATCH] transcoder: Fix potential use of uninitialized variables gst_structure_get won't touch variables if the field is not present leading to potential use of initialized vars Part-of: --- gst-libs/gst/transcoder/gsttranscoder-signal-adapter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/transcoder/gsttranscoder-signal-adapter.c b/gst-libs/gst/transcoder/gsttranscoder-signal-adapter.c index 9cad67c0d9..6d544051f9 100644 --- a/gst-libs/gst/transcoder/gsttranscoder-signal-adapter.c +++ b/gst-libs/gst/transcoder/gsttranscoder-signal-adapter.c @@ -99,7 +99,7 @@ gst_transcoder_signal_adapter_emit (GstTranscoderSignalAdapter * self, break; case GST_TRANSCODER_MESSAGE_ERROR:{ GError *error = NULL; - GstStructure *details; + GstStructure *details = NULL; gst_structure_get (message_data, GST_TRANSCODER_MESSAGE_DATA_ERROR, G_TYPE_ERROR, &error, GST_TYPE_STRUCTURE, &details, NULL); @@ -110,7 +110,7 @@ gst_transcoder_signal_adapter_emit (GstTranscoderSignalAdapter * self, break; } case GST_TRANSCODER_MESSAGE_WARNING:{ - GstStructure *details; + GstStructure *details = NULL; GError *error = NULL; gst_structure_get (message_data, GST_TRANSCODER_MESSAGE_DATA_WARNING,