aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--osdep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/osdep.c b/osdep.c
index aa061a90ad..83f5a77ccc 100644
--- a/osdep.c
+++ b/osdep.c
@@ -235,6 +235,8 @@ void qemu_free(void *ptr)
{
MemoryBlock *mb;
+ if (!ptr)
+ return;
mb = (MemoryBlock *)((uint8_t *)ptr - BLOCK_HEADER_SIZE);
mb->next = first_free_block;
first_free_block = mb;