[glib/wip/gcleanup: 74/106] param: Avoid g_test_add_data_func_full() which leaks



commit 10b6f08324e1852328bf426bd5c8c17f1820efc1
Author: Stef Walter <stefw gnome org>
Date:   Fri Nov 8 08:48:02 2013 +0100

    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 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gobject/tests/param.c b/gobject/tests/param.c
index 5e11962..c317456 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);
           }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]