]> Git Repo - qemu.git/commitdiff
fix memory leak in aio_write_f
authorAlex Jia <[email protected]>
Wed, 28 Sep 2011 06:57:01 +0000 (14:57 +0800)
committerKevin Wolf <[email protected]>
Fri, 21 Oct 2011 15:34:12 +0000 (17:34 +0200)
Haven't released memory of 'ctx' before return.

Signed-off-by: Alex Jia <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
qemu-io.c

index e91af3747b84e3e917a48dd1a0c22ded69dea607..c45a4138b25bfa70897622354617ff46919483c6 100644 (file)
--- 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;
This page took 0.025642 seconds and 4 git commands to generate.