userenv/tests: Fix some memory leaks.

Found by Valgrind.
This commit is contained in:
Hans Leidekker 2009-12-07 09:19:23 +01:00 committed by Alexandre Julliard
parent 7d3f37fcbd
commit 952cd1d36a
1 changed files with 8 additions and 0 deletions

View File

@ -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)