From: Alex Jia <a...@redhat.com>

Haven't released memory of 'ctx' before return.

Signed-off-by: Alex Jia <a...@redhat.com>
Signed-off-by: Kevin Wolf <kw...@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.6.4


Reply via email to