From: ajia@redhat.com
To: qemu-devel@nongnu.org
Cc: Alex Jia <ajia@redhat.com>
Subject: [Qemu-devel] [PATCH] fix memory leak in aio_write_f
Date: Wed, 28 Sep 2011 14:57:01 +0800 [thread overview]
Message-ID: <1317193022-13504-1-git-send-email-ajia@redhat.com> (raw)
From: Alex Jia <ajia@redhat.com>
Haven't released memory of 'ctx' before return.
Signed-off-by: Alex Jia <ajia@redhat.com>
---
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
next reply other threads:[~2011-09-28 6:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 6:57 ajia [this message]
2011-09-28 6:57 ` [Qemu-devel] [PATCH] linux-user: fix memory leak in failure path ajia
2011-09-28 7:55 ` Peter Maydell
2011-09-28 8:27 ` Alex Jia
2011-10-17 9:57 ` [Qemu-devel] [PATCH] fix memory leak in aio_write_f Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317193022-13504-1-git-send-email-ajia@redhat.com \
--to=ajia@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).