From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39526 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrDbh-0006d0-At for qemu-devel@nongnu.org; Sun, 20 Feb 2011 13:02:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrDKu-0001WG-Be for qemu-devel@nongnu.org; Sun, 20 Feb 2011 12:44:45 -0500 Received: from hall.aurel32.net ([88.191.126.93]:49059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrDKu-0001WA-5u for qemu-devel@nongnu.org; Sun, 20 Feb 2011 12:44:44 -0500 Date: Sun, 20 Feb 2011 18:44:39 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 1/3] tests: Fix two memory leaks Message-ID: <20110220174439.GP18619@volta.aurel32.net> References: <1295646569-31125-1-git-send-email-weil@mail.berlios.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1295646569-31125-1-git-send-email-weil@mail.berlios.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: QEMU Developers On Fri, Jan 21, 2011 at 10:49:29PM +0100, Stefan Weil wrote: > 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 > --- > tests/linux-test.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) Thanks, applied. > 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 > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net