qemu-io: Fix memory leak in 'aio_write -z'
authorKevin Wolf <kwolf@redhat.com>
Mon, 9 May 2016 10:03:04 +0000 (12:03 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 12 May 2016 13:22:08 +0000 (15:22 +0200)
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
qemu-io-cmds.c

index e34f7771182146de192936fe18b44f79f65804e4..41580b52473e6139985ebade8d3f55ecc608c13a 100644 (file)
@@ -1699,6 +1699,7 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)
         int64_t count = cvtnum(argv[optind]);
         if (count < 0) {
             print_cvtnum_err(count, argv[optind]);
+            g_free(ctx);
             return 0;
         }