qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fix memory leak in aio_write_f
@ 2011-09-28  6:57 ajia
  2011-09-28  6:57 ` [Qemu-devel] [PATCH] linux-user: fix memory leak in failure path ajia
  2011-10-17  9:57 ` [Qemu-devel] [PATCH] fix memory leak in aio_write_f Kevin Wolf
  0 siblings, 2 replies; 5+ messages in thread
From: ajia @ 2011-09-28  6:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Jia

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-10-17  9:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-28  6:57 [Qemu-devel] [PATCH] fix memory leak in aio_write_f ajia
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

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).