diff --git a/ChangeLog b/ChangeLog
index 6b94c8fd6f..ac6cd5d987 100644
--- 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):
diff --git a/gst/multipart/multipartmux.c b/gst/multipart/multipartmux.c
index 562e5cced8..498f8252d7 100644
--- a/gst/multipart/multipartmux.c
+++ b/gst/multipart/multipartmux.c
@@ -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;
   }