directfb: fix mem leak 23/134423/3
authorEunhae Choi <eunhae1.choi@samsung.com>
Fri, 16 Jun 2017 09:40:29 +0000 (18:40 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Mon, 19 Jun 2017 12:25:49 +0000 (21:25 +0900)
Change-Id: Id5069d045f280114a18dda098659a0096f8cb301

ext/directfb/dfbvideosink.c

index 22dd3d70a0debc41638627f124a164361f582752..900c6b169268737c6339ce6f5a8e4dc0a13e2e44 100644 (file)
@@ -1848,6 +1848,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;
     }
@@ -1855,6 +1856,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;
     }