Merge branch 'gsubprocess-test-leak' into 'main'

tests: Fix a minor leak in a new GSubprocess test

See merge request GNOME/glib!4497
This commit is contained in:
Philip Withnall 2025-02-18 15:22:14 +00:00
commit d705612505

View File

@ -1356,16 +1356,16 @@ static void
test_fail_initialization (void)
{
GError *local_error = NULL;
GError **error = &local_error;
GSubprocess *proc;
proc = g_subprocess_new (G_SUBPROCESS_FLAGS_NONE,
error,
&local_error,
"thisprogramshouldnotexistprettyplease",
NULL);
g_assert_null (proc);
g_assert_error (local_error, G_SPAWN_ERROR, G_SPAWN_ERROR_NOENT);
g_assert_null (proc);
g_clear_error (&local_error);
}
#ifdef G_OS_UNIX