From 15240b8500b10bae08ec99beb935d4c6032b0ded Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 8 Nov 2013 08:48:02 +0100 Subject: [PATCH] param: Avoid g_test_add_data_func_full() which leaks It leaks on tests that have not been run. This is the case when the g_test_subprocess mechanics are in use. https://bugzilla.gnome.org/show_bug.cgi?id=711778 --- gobject/tests/param.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gobject/tests/param.c b/gobject/tests/param.c index b3e9bd490..b77e6e345 100644 --- a/gobject/tests/param.c +++ b/gobject/tests/param.c @@ -852,7 +852,8 @@ main (int argc, char *argv[]) data.change_this_flag, data.change_this_type, data.use_this_flag, data.use_this_type); test_data = g_memdup (&data, sizeof (TestParamImplementData)); - g_test_add_data_func_full (test_path, test_data, test_param_implement_child, g_free); + g_test_add_data_func (test_path, test_data, test_param_implement_child); + G_CLEANUP (test_data, g_free); g_free (test_path); }