Commit 57c30724825ac4601da66562ebe56d3147275b47

Authored by bellard
1 parent 73332e5c

fixing free


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@707 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 0 deletions
... ... @@ -235,6 +235,8 @@ void qemu_free(void *ptr)
235 235 {
236 236 MemoryBlock *mb;
237 237  
  238 + if (!ptr)
  239 + return;
238 240 mb = (MemoryBlock *)((uint8_t *)ptr - BLOCK_HEADER_SIZE);
239 241 mb->next = first_free_block;
240 242 first_free_block = mb;
... ...