From: Stefan Weil <weil@mail.berlios.de>
To: QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH 1/3] tests: Fix two memory leaks
Date: Fri, 21 Jan 2011 22:49:29 +0100 [thread overview]
Message-ID: <1295646569-31125-1-git-send-email-weil@mail.berlios.de> (raw)
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>
---
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
next reply other threads:[~2011-01-21 21:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-21 21:49 Stefan Weil [this message]
2011-02-20 17:44 ` [Qemu-devel] [PATCH 1/3] tests: Fix two memory leaks Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1295646569-31125-1-git-send-email-weil@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).