mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-02 19:59:21 +02:00
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
This commit is contained in:
@@ -852,7 +852,8 @@ main (int argc, char *argv[])
|
|||||||
data.change_this_flag, data.change_this_type,
|
data.change_this_flag, data.change_this_type,
|
||||||
data.use_this_flag, data.use_this_type);
|
data.use_this_flag, data.use_this_type);
|
||||||
test_data = g_memdup (&data, sizeof (TestParamImplementData));
|
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);
|
g_free (test_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user