diff options
| author | Stefan Weil | 2011-01-21 22:49:29 +0100 |
|---|---|---|
| committer | Aurelien Jarno | 2011-02-20 18:45:08 +0100 |
| commit | 8da91fffeaffba5f014dfdcc88b672590e83b7fc (patch) | |
| tree | ca85a90c0d5c5742110a94278bf8f208ccfca240 /tests | |
| parent | qemu-char: Check for missing backend name (diff) | |
| download | qemu-8da91fffeaffba5f014dfdcc88b672590e83b7fc.tar.gz qemu-8da91fffeaffba5f014dfdcc88b672590e83b7fc.tar.xz qemu-8da91fffeaffba5f014dfdcc88b672590e83b7fc.zip | |
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>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/linux-test.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/linux-test.c b/tests/linux-test.c index 9986e299b2..2e4a746ac3 100644 --- a/tests/linux-test.c +++ b/tests/linux-test.c @@ -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"); |
