mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
userenv/tests: Fix some memory leaks.
Found by Valgrind.
This commit is contained in:
parent
7d3f37fcbd
commit
952cd1d36a
@ -145,6 +145,7 @@ static void test_create_env(void)
|
||||
todo_wine expect_env(TRUE, r, common_vars[i].name);
|
||||
else
|
||||
expect_env(TRUE, r, common_vars[i].name);
|
||||
if (r) HeapFree(GetProcessHeap(), 0, st);
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,6 +165,7 @@ static void test_create_env(void)
|
||||
todo_wine expect_env(TRUE, r, common_post_nt4_vars[i].name);
|
||||
else
|
||||
expect_env(TRUE, r, common_post_nt4_vars[i].name);
|
||||
if (r) HeapFree(GetProcessHeap(), 0, st);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -178,17 +180,23 @@ static void test_create_env(void)
|
||||
todo_wine expect_env(TRUE, r, htok_vars[i].name);
|
||||
else
|
||||
expect_env(TRUE, r, htok_vars[i].name);
|
||||
if (r) HeapFree(GetProcessHeap(), 0, st);
|
||||
}
|
||||
}
|
||||
|
||||
r = get_env(env[0], "WINE_XYZZY", &st);
|
||||
expect(FALSE, r);
|
||||
|
||||
r = get_env(env[1], "WINE_XYZZY", &st);
|
||||
expect(FALSE, r);
|
||||
|
||||
r = get_env(env[2], "WINE_XYZZY", &st);
|
||||
expect(TRUE, r);
|
||||
if (r) HeapFree(GetProcessHeap(), 0, st);
|
||||
|
||||
r = get_env(env[3], "WINE_XYZZY", &st);
|
||||
expect(TRUE, r);
|
||||
if (r) HeapFree(GetProcessHeap(), 0, st);
|
||||
}
|
||||
|
||||
START_TEST(userenv)
|
||||
|
Loading…
Reference in New Issue
Block a user