From 4ef53c455b06379dee9d98835cba1467b94e4e0e Mon Sep 17 00:00:00 2001 From: Eunhae Choi Date: Mon, 19 Jun 2017 21:59:29 +0900 Subject: [PATCH] directfb: fix caps leak add unref in case of error https://bugzilla.gnome.org/show_bug.cgi?id=783961 --- ext/directfb/dfbvideosink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/directfb/dfbvideosink.c b/ext/directfb/dfbvideosink.c index be624ba691..2a7cfee544 100644 --- a/ext/directfb/dfbvideosink.c +++ b/ext/directfb/dfbvideosink.c @@ -1849,6 +1849,7 @@ gst_dfbvideosink_show_frame (GstBaseSink * bsink, GstBuffer * buf) caps = gst_pad_get_current_caps (GST_BASE_SINK_PAD (bsink)); if (!gst_video_info_from_caps (&src_info, caps)) { GST_WARNING_OBJECT (dfbvideosink, "failed getting video info"); + gst_caps_unref (caps); ret = GST_FLOW_ERROR; goto beach; } @@ -1856,6 +1857,7 @@ gst_dfbvideosink_show_frame (GstBaseSink * bsink, GstBuffer * buf) str = gst_structure_get_string (structure, "format"); if (str == NULL) { GST_WARNING ("failed grabbing fourcc from caps %" GST_PTR_FORMAT, caps); + gst_caps_unref (caps); ret = GST_FLOW_ERROR; goto beach; }