tests/check/gst/gstbin.c: Fix leaks in the new unit test.
authorJan Schmidt <thaytan@mad.scientist.com>
Fri, 24 Aug 2007 14:55:46 +0000 (14:55 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Fri, 24 Aug 2007 14:55:46 +0000 (14:55 +0000)
Original commit message from CVS:
* tests/check/gst/gstbin.c: (GST_START_TEST):
Fix leaks in the new unit test.

ChangeLog
tests/check/gst/gstbin.c

index b07abe4..16e9a45 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-08-24  Jan Schmidt  <thaytan@mad.scientist.com>
+
+       * tests/check/gst/gstbin.c: (GST_START_TEST):
+         Fix leaks in the new unit test.
+
 2007-08-23  Tim-Philipp Müller  <tim at centricular dot net>
 
        * gst/gst.c:
index 3bf39dc..46b9bb6 100644 (file)
@@ -874,10 +874,17 @@ GST_START_TEST (test_iterate_sorted)
   it = gst_bin_iterate_sorted (GST_BIN (pipeline));
   fail_unless (gst_iterator_next (it, &elem) == GST_ITERATOR_OK);
   fail_unless (elem == sink2);
+  gst_object_unref (elem);
+
   fail_unless (gst_iterator_next (it, &elem) == GST_ITERATOR_OK);
   fail_unless (elem == identity);
+  gst_object_unref (elem);
+
   fail_unless (gst_iterator_next (it, &elem) == GST_ITERATOR_OK);
   fail_unless (elem == bin);
+  gst_object_unref (elem);
+
+  gst_iterator_free (it);
 
   gst_object_unref (pipeline);
 }