mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
tests: Fix a double-free in param test
This isn’t normally hit because it’s in a test which is disabled unless run with `-m thorough`. The data is owned by `g_test_add_data_func_full()` until the end of the process. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
d738dcc76f
commit
a4b9b41afc
@ -1670,8 +1670,7 @@ 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_memdup2 (&data, sizeof (TestParamImplementData));
|
test_data = g_memdup2 (&data, sizeof (TestParamImplementData));
|
||||||
g_test_add_data_func_full (test_path, test_data, test_param_implement_child, g_free);
|
g_test_add_data_func_full (test_path, g_steal_pointer (&test_data), test_param_implement_child, g_free);
|
||||||
g_free (test_data);
|
|
||||||
g_free (test_path);
|
g_free (test_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user