From ddcc1c64429904e08ea513b1431690e8e473f7d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 10 May 2016 09:40:38 +0100 Subject: [PATCH] decklinkvideosrc: fix use-after-free in error code path --- sys/decklink/gstdecklinkvideosrc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/decklink/gstdecklinkvideosrc.cpp b/sys/decklink/gstdecklinkvideosrc.cpp index 8854c1b..a795f20 100644 --- a/sys/decklink/gstdecklinkvideosrc.cpp +++ b/sys/decklink/gstdecklinkvideosrc.cpp @@ -567,10 +567,10 @@ gst_decklink_video_src_create (GstPushSrc * bsrc, GstBuffer ** buffer) self->caps_mode = f->mode; } else { g_mutex_unlock (&self->lock); - capture_frame_free (f); GST_ELEMENT_ERROR (self, CORE, NEGOTIATION, ("Invalid mode in captured frame"), ("Mode set to %d but captured %d", self->caps_mode, f->mode)); + capture_frame_free (f); return GST_FLOW_NOT_NEGOTIATED; } } @@ -582,10 +582,10 @@ gst_decklink_video_src_create (GstPushSrc * bsrc, GstBuffer ** buffer) self->caps_format = f->format; } else { g_mutex_unlock (&self->lock); - capture_frame_free (f); GST_ELEMENT_ERROR (self, CORE, NEGOTIATION, ("Invalid pixel format in captured frame"), ("Format set to %d but captured %d", self->caps_format, f->format)); + capture_frame_free (f); return GST_FLOW_NOT_NEGOTIATED; } } -- 2.7.4