gst/gstutils.c: Free iterator when done (#347311).

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.
This commit is contained in:
Antoine Tremblay 2006-07-14 16:20:18 +00:00 committed by Tim-Philipp Müller
parent 7bb58cbf66
commit 147c3d0ef6
3 changed files with 26 additions and 0 deletions

View file

@ -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:

View file

@ -1811,6 +1811,7 @@ gst_element_unlink (GstElement * src, GstElement * dest)
break;
}
}
gst_iterator_free (pads);
}
/**

View 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;
}