mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
tests/test-runner: Don't leak tests array
Make sure we properly free the array and its string elements Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2817>
This commit is contained in:
parent
1a814250c0
commit
019267a044
@ -1430,7 +1430,7 @@ int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
g_autoptr (MetaContext) context = NULL;
|
||||
GPtrArray *tests;
|
||||
g_autoptr (GPtrArray) tests = NULL;
|
||||
RunTestsInfo info;
|
||||
|
||||
context = meta_create_test_context (META_CONTEXT_TEST_TYPE_HEADLESS,
|
||||
@ -1440,7 +1440,7 @@ main (int argc, char **argv)
|
||||
|
||||
g_assert (meta_context_configure (context, &argc, &argv, NULL));
|
||||
|
||||
tests = g_ptr_array_new ();
|
||||
tests = g_ptr_array_new_with_free_func (g_free);
|
||||
if (all_tests)
|
||||
{
|
||||
GFile *test_dir = g_file_new_for_path (MUTTER_PKGDATADIR "/tests");
|
||||
|
Loading…
Reference in New Issue
Block a user