]> git.proxmox.com Git - mirror_qemu.git/commitdiff
win32-aio: Fix how win32_aio_process_completion() frees buffer
authorMarkus Armbruster <armbru@redhat.com>
Tue, 15 Jan 2013 13:23:39 +0000 (14:23 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 15 Jan 2013 15:47:45 +0000 (16:47 +0100)
win32_aio_submit() allocates it with qemu_blockalign(), therefore it
must be freed with qemu_vfree(), not g_free().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/win32-aio.c

index 46a5db78cc3dc5a22c4eff0e7d09fb5fd55b4485..03833700b4226dd02810e72564f0e40a9283df5a 100644 (file)
@@ -87,7 +87,7 @@ static void win32_aio_process_completion(QEMUWin32AIOState *s,
                 memcpy(p, qiov->iov[i].iov_base, qiov->iov[i].iov_len);
                 p += qiov->iov[i].iov_len;
             }
-            g_free(waiocb->buf);
+            qemu_vfree(waiocb->buf);
         }
     }