From patchwork Wed Sep 28 06:57:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: fix memory leak in aio_write_f Date: Tue, 27 Sep 2011 20:57:01 -0000 From: ajia@redhat.com X-Patchwork-Id: 116704 Message-Id: <1317193022-13504-1-git-send-email-ajia@redhat.com> 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;