tests: Fix two memory leaks

Although both leaks are not really important, fix them
to avoid cppcheck warnings:

tests/linux-test.c:433: error: Memory leak: stack1
tests/linux-test.c:433: error: Memory leak: stack2

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Stefan Weil 2011-01-21 22:49:29 +01:00 committed by Aurelien Jarno
parent 1bbd185fa8
commit 8da91fffea
1 changed files with 2 additions and 0 deletions

View File

@ -426,7 +426,9 @@ void test_clone(void)
CLONE_VM | CLONE_FS | CLONE_FILES | SIGCHLD, "hello2"));
while (waitpid(pid1, &status1, 0) != pid1);
free(stack1);
while (waitpid(pid2, &status2, 0) != pid2);
free(stack2);
if (thread1_res != 5 ||
thread2_res != 6)
error("clone");