aboutsummaryrefslogtreecommitdiff
path: root/qemu-io.c
diff options
context:
space:
mode:
authorAlex Jia <ajia@redhat.com>2011-09-28 14:57:01 +0800
committerKevin Wolf <kwolf@redhat.com>2011-10-21 17:34:12 +0200
commitb1b1dad31f3a092e046b09795f4476705c4e564e (patch)
tree3bfc036291212aad999c2629736f9185b1e86f1c /qemu-io.c
parent35246a6825121f3881b8540beb731d582aa6d697 (diff)
fix memory leak in aio_write_f
Haven't released memory of 'ctx' before return. Signed-off-by: Alex Jia <ajia@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-io.c')
-rw-r--r--qemu-io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-io.c b/qemu-io.c
index e91af3747b..c45a4138b2 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;