matroska: do not leak attachment buffers
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 12 Jan 2012 14:19:22 +0000 (14:19 +0000)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 12 Jan 2012 14:19:22 +0000 (14:19 +0000)
gst/matroska/matroska-read-common.c

index 188dea9..d2c2bea 100644 (file)
@@ -633,6 +633,9 @@ gst_matroska_read_common_parse_attached_file (GstMatroskaReadCommon * common,
     else
       gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND, GST_TAG_ATTACHMENT,
           tagbuffer, NULL);
+
+    /* the tag list adds it own ref */
+    gst_buffer_unref (tagbuffer);
   }
 
   g_free (filename);