asfmux: Fix buffer leak in the unit test
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 21 Dec 2010 16:03:43 +0000 (17:03 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 21 Dec 2010 16:05:34 +0000 (17:05 +0100)
tests/check/elements/asfmux.c

index 6c3dab5..abc641f 100644 (file)
@@ -156,6 +156,7 @@ check_asfmux_pad (GstStaticPadTemplate * srctemplate,
   GstBuffer *inbuffer;
   GstCaps *caps;
   GstFlowReturn ret;
+  GList *l;
 
   asfmux = setup_asfmux (srctemplate, sinkname);
   fail_unless (gst_element_set_state (asfmux,
@@ -172,6 +173,8 @@ check_asfmux_pad (GstStaticPadTemplate * srctemplate,
   fail_unless (ret == GST_FLOW_OK, "Pad push returned: %d", ret);
 
   cleanup_asfmux (asfmux, sinkname);
+  for (l = buffers; l; l = l->next)
+    gst_buffer_unref (l->data);
   g_list_free (buffers);
   buffers = NULL;
 }