aboutsummaryrefslogtreecommitdiff
path: root/block/mirror.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2013-01-15 15:29:10 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-01-15 17:28:55 +0100
commit7191bf311ea9722cdcc3b2229788eff69d896bd0 (patch)
tree8f2f912d31b034c8a27bab9aff10e984dd4fcfc9 /block/mirror.c
parent7479acdbce2ecf6cbd0b7d72b81608c8fc51b1ae (diff)
block: Fix how mirror_run() frees its buffer
It allocates with qemu_blockalign(), therefore it must free with qemu_vfree(), not g_free(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/mirror.c')
-rw-r--r--block/mirror.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/mirror.c b/block/mirror.c
index 8aeacbf12c..6180aa30e5 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -225,7 +225,7 @@ static void coroutine_fn mirror_run(void *opaque)
}
immediate_exit:
- g_free(s->buf);
+ qemu_vfree(s->buf);
bdrv_set_dirty_tracking(bs, false);
bdrv_iostatus_disable(s->target);
if (s->should_complete && ret == 0) {