[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/3] tests: Fix two memory leaks
From: |
Stefan Weil |
Subject: |
[Qemu-devel] [PATCH 1/3] tests: Fix two memory leaks |
Date: |
Fri, 21 Jan 2011 22:49:29 +0100 |
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 <address@hidden>
---
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 9986e29..2e4a746 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");
--
1.7.2.3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH 1/3] tests: Fix two memory leaks,
Stefan Weil <=