From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46186 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pgcba-0003fo-2S for qemu-devel@nongnu.org; Sat, 22 Jan 2011 07:30:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgcbY-0006Sb-Rp for qemu-devel@nongnu.org; Sat, 22 Jan 2011 07:30:09 -0500 Received: from mtagate7.uk.ibm.com ([194.196.100.167]:58725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgcbY-0006SU-JV for qemu-devel@nongnu.org; Sat, 22 Jan 2011 07:30:08 -0500 Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate7.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p0M9TrlY006200 for ; Sat, 22 Jan 2011 09:29:53 GMT Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p0M9Ttub1536078 for ; Sat, 22 Jan 2011 09:29:55 GMT Received: from d06av07.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p0M9TquT028150 for ; Sat, 22 Jan 2011 02:29:52 -0700 From: Stefan Hajnoczi Date: Sat, 22 Jan 2011 09:29:18 +0000 Message-Id: <1295688567-25496-4-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1295688567-25496-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1295688567-25496-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC][PATCH 03/12] Make sure to release allocated stack when coroutine is released. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Anthony Liguori , Stefan Hajnoczi Copied from a fix to the original code by Anthony Liguori . Signed-off-by: Stefan Hajnoczi --- coroutine_ucontext.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/coroutine_ucontext.c b/coroutine_ucontext.c index 25e8687..f76da94 100644 --- a/coroutine_ucontext.c +++ b/coroutine_ucontext.c @@ -38,6 +38,7 @@ static int _coroutine_release(struct continuation *cc) if (ret < 0) return ret; } + munmap(co->cc.stack, co->cc.stack_size); co->caller = NULL; -- 1.7.2.3