aboutsummaryrefslogtreecommitdiff
path: root/osdep.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-04-04 20:36:29 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-04-04 20:36:29 +0000
commit57c30724825ac4601da66562ebe56d3147275b47 (patch)
tree702d2b2ea7837a23ff23db4b8d452a506537bd06 /osdep.c
parent73332e5ccdc760c9f0861dd8528dd7702afce088 (diff)
downloadqemu-57c30724825ac4601da66562ebe56d3147275b47.zip
qemu-57c30724825ac4601da66562ebe56d3147275b47.tar.gz
qemu-57c30724825ac4601da66562ebe56d3147275b47.tar.bz2
fixing free
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@707 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'osdep.c')
-rw-r--r--osdep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/osdep.c b/osdep.c
index aa061a9..83f5a77 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;