From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8o4o-0006eZ-Kz for qemu-devel@nongnu.org; Wed, 28 Sep 2011 02:57:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R8o4n-000681-VV for qemu-devel@nongnu.org; Wed, 28 Sep 2011 02:57:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8o4n-00067r-JI for qemu-devel@nongnu.org; Wed, 28 Sep 2011 02:57:05 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8S6v3aO032306 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 28 Sep 2011 02:57:03 -0400 From: ajia@redhat.com Date: Wed, 28 Sep 2011 14:57:01 +0800 Message-Id: <1317193022-13504-1-git-send-email-ajia@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH] fix memory leak in aio_write_f List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alex Jia From: Alex Jia Haven't released memory of 'ctx' before return. Signed-off-by: Alex Jia --- qemu-io.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index e91af37..c45a413 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -1248,6 +1248,7 @@ static int aio_write_f(int argc, char **argv) case 'P': pattern = parse_pattern(optarg); if (pattern < 0) { + free(ctx); return 0; } break; -- 1.7.1