gst/gstutils.c: Free iterator when done (#347311).
authorAntoine Tremblay <hexa00@gmail.com>
Fri, 14 Jul 2006 16:20:18 +0000 (16:20 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Fri, 14 Jul 2006 16:20:18 +0000 (16:20 +0000)
Original commit message from CVS:
Patch by: Antoine Tremblay <hexa00 at gmail com>
* gst/gstutils.c: (gst_element_unlink):
Free iterator when done (#347311).
* tests/check/gst/gstutils.c: (GST_START_TEST), (gst_utils_suite):
And add a test case for this.

ChangeLog
gst/gstutils.c
tests/check/gst/gstutils.c

index f086b43..1780749 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-07-14  Tim-Philipp Müller  <tim at centricular dot net>
+
+       Patch by: Antoine Tremblay <hexa00 at gmail com>
+
+       * gst/gstutils.c: (gst_element_unlink):
+         Free iterator when done (#347311).
+
+       * tests/check/gst/gstutils.c: (GST_START_TEST), (gst_utils_suite):
+         And add a test case for this.
+
 2006-07-14  Jan Schmidt  <thaytan@mad.scientist.com>
 
        * configure.ac:
index ac1bf33..f6f9d38 100644 (file)
@@ -1811,6 +1811,7 @@ gst_element_unlink (GstElement * src, GstElement * dest)
         break;
     }
   }
+  gst_iterator_free (pads);
 }
 
 /**
index e869d37..c9f6784 100644 (file)
@@ -448,6 +448,20 @@ GST_START_TEST (test_element_found_tags)
 
 GST_END_TEST;
 
+GST_START_TEST (test_element_unlink)
+{
+  GstElement *src, *sink;
+
+  src = gst_element_factory_make ("fakesrc", NULL);
+  sink = gst_element_factory_make ("fakesink", NULL);
+  fail_unless (gst_element_link (src, sink) != FALSE);
+  gst_element_unlink (src, sink);
+  gst_object_unref (src);
+  gst_object_unref (sink);
+}
+
+GST_END_TEST;
+
 Suite *
 gst_utils_suite (void)
 {
@@ -466,6 +480,7 @@ gst_utils_suite (void)
   tcase_add_test (tc_chain, test_parse_bin_from_description);
 #endif
   tcase_add_test (tc_chain, test_element_found_tags);
+  tcase_add_test (tc_chain, test_element_unlink);
   return s;
 }