omxvideodec: fix memory leak gst_omx_video_dec_negotiate
authorChristian König <christian.koenig@amd.com>
Fri, 7 Mar 2014 12:18:49 +0000 (13:18 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Sat, 8 Mar 2014 14:22:15 +0000 (15:22 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=725907

omx/gstomxvideodec.c

index fd1e1fdb5716ff1891f633ce034d0a1b81604af7..2a301401013767184b406b2bb73af716e3cca66b 100644 (file)
@@ -2379,10 +2379,12 @@ gst_omx_video_dec_negotiate (GstOMXVideoDec * self)
           gst_video_format_from_string (format_str)) ==
       GST_VIDEO_FORMAT_UNKNOWN) {
     GST_ERROR_OBJECT (self, "Invalid caps: %" GST_PTR_FORMAT, intersection);
+    gst_caps_unref (intersection);
     g_list_free_full (negotiation_map,
         (GDestroyNotify) video_negotiation_map_free);
     return FALSE;
   }
+  gst_caps_unref (intersection);
 
   GST_OMX_INIT_STRUCT (&param);
   param.nPortIndex = self->dec_out_port->index;