From d465851cb7dd6ffb7deab23e21ae1d08342640cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 8 Aug 2009 22:27:06 +0200 Subject: [PATCH] check: Call gst_task_cleanup_all() in GST_END_TEST This fixes many unit tests under valgrind that shows leaking GstTasks that are not really leaked but just not unreffed by the task thread before the unit test stopped. Fixes bug #591045. --- libs/gst/check/gstcheck.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/gst/check/gstcheck.h b/libs/gst/check/gstcheck.h index ab3c0f0b62..f486aa266f 100644 --- a/libs/gst/check/gstcheck.h +++ b/libs/gst/check/gstcheck.h @@ -121,7 +121,8 @@ static void __testname (int __i__)\ GST_DEBUG ("test start"); \ tcase_fn_start (""# __testname, __FILE__, __LINE__); -#define GST_END_TEST END_TEST +#define GST_END_TEST gst_task_cleanup_all (); \ + END_TEST #else #define GST_START_TEST(__testname) \ static void __testname ()\ @@ -129,7 +130,8 @@ static void __testname ()\ GST_DEBUG ("test start"); \ tcase_fn_start (""# __testname, __FILE__, __LINE__); -#define GST_END_TEST END_TEST +#define GST_END_TEST gst_task_cleanup_all (); \ + END_TEST #endif