diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-15 16:52:56 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-15 16:52:56 -0600 |
commit | b9f84ac0fa81315bf4efa8db64f0705273b7499a (patch) | |
tree | 23e52b0dceb04a1dbd53432b5276005ed221f87a /util/oslib-win32.c | |
parent | c94bf1c107df6623e54d48b90fb439a1281a36de (diff) | |
parent | 7191bf311ea9722cdcc3b2229788eff69d896bd0 (diff) |
Merge remote-tracking branch 'stefanha/block' into staging
* stefanha/block:
block: Fix how mirror_run() frees its buffer
win32-aio: Fix how win32_aio_process_completion() frees buffer
scsi-disk: qemu_vfree(NULL) is fine, simplify
w32: Make qemu_vfree() accept NULL like the POSIX implementation
sheepdog: clean up sd_aio_setup()
sheepdog: multiplex the rw FD to flush cache
block: clear dirty bitmap when discarding
ide: issue discard asynchronously but serialize the pieces
ide: fix TRIM with empty range entry
block: make discard asynchronous
raw: support discard on block devices
raw-posix: remember whether discard failed
raw-posix: support discard on more filesystems
block: fix initialization in bdrv_io_limits_enable()
qcow2: Fix segfault on zero-length write
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'util/oslib-win32.c')
-rw-r--r-- | util/oslib-win32.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/oslib-win32.c b/util/oslib-win32.c index e7e283e875..640194c0cf 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -71,7 +71,9 @@ void *qemu_vmalloc(size_t size) void qemu_vfree(void *ptr) { trace_qemu_vfree(ptr); - VirtualFree(ptr, 0, MEM_RELEASE); + if (ptr) { + VirtualFree(ptr, 0, MEM_RELEASE); + } } /* FIXME: add proper locking */ |