gst/multipart/multipartmux.c: Fix caps memory leak. Fixes #514573.
authororjan <orjanf@axis.com>
Tue, 5 Feb 2008 17:59:24 +0000 (17:59 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Tue, 5 Feb 2008 17:59:24 +0000 (17:59 +0000)
Original commit message from CVS:
Patch by: orjan <orjanf at axis dot com>
* gst/multipart/multipartmux.c: (gst_multipart_mux_collected):
Fix caps memory leak. Fixes #514573.

ChangeLog
gst/multipart/multipartmux.c

index 6b94c8f..ac6cd5d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-02-05  Wim Taymans  <wim.taymans@collabora.co.uk>
+
+       Patch by: orjan <orjanf at axis dot com>
+
+       * gst/multipart/multipartmux.c: (gst_multipart_mux_collected):
+       Fix caps memory leak. Fixes #514573.
+
 2008-02-04  Edward Hervey  <edward.hervey@collabora.co.uk>
 
        * gst/avi/gstavidemux.c: (gst_avi_demux_parse_subindex):
index 562e5cc..498f825 100644 (file)
@@ -427,9 +427,12 @@ gst_multipart_mux_collected (GstCollectPads * pads, GstMultipartMux * mux)
     newcaps = gst_caps_new_simple ("multipart/x-mixed-replace",
         "boundary", G_TYPE_STRING, mux->boundary, NULL);
 
-    if (!gst_pad_set_caps (mux->srcpad, newcaps))
+    if (!gst_pad_set_caps (mux->srcpad, newcaps)) {
+      gst_caps_unref (newcaps);
       goto nego_error;
+    }
 
+    gst_caps_unref (newcaps);
     mux->negotiated = TRUE;
   }