block: Fix how mirror_run() frees its buffer
authorMarkus Armbruster <armbru@redhat.com>
Tue, 15 Jan 2013 14:29:10 +0000 (15:29 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 15 Jan 2013 16:28:55 +0000 (17:28 +0100)
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>
block/mirror.c

index 8aeacbf12c768e1654ad512a2e2c1be4d81bd588..6180aa30e53b1be8d70f467666e2a8a340f083ba 100644 (file)
@@ -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) {