From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHIhh-00067T-PZ for qemu-devel@nongnu.org; Fri, 21 Oct 2011 13:16:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHIhf-0002di-S1 for qemu-devel@nongnu.org; Fri, 21 Oct 2011 13:16:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHIhf-0002da-H5 for qemu-devel@nongnu.org; Fri, 21 Oct 2011 13:16:19 -0400 From: Kevin Wolf Date: Fri, 21 Oct 2011 19:19:01 +0200 Message-Id: <1319217556-28273-5-git-send-email-kwolf@redhat.com> In-Reply-To: <1319217556-28273-1-git-send-email-kwolf@redhat.com> References: <1319217556-28273-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 04/19] fix memory leak in aio_write_f List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Alex Jia Haven't released memory of 'ctx' before return. Signed-off-by: Alex Jia Signed-off-by: Kevin Wolf --- 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.6.4