提交 57c30724 编写于 作者: B bellard

fixing free


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@707 c046a42c-6fe2-441c-8c8c-71466251a162
上级 73332e5c
...@@ -235,6 +235,8 @@ void qemu_free(void *ptr) ...@@ -235,6 +235,8 @@ void qemu_free(void *ptr)
{ {
MemoryBlock *mb; MemoryBlock *mb;
if (!ptr)
return;
mb = (MemoryBlock *)((uint8_t *)ptr - BLOCK_HEADER_SIZE); mb = (MemoryBlock *)((uint8_t *)ptr - BLOCK_HEADER_SIZE);
mb->next = first_free_block; mb->next = first_free_block;
first_free_block = mb; first_free_block = mb;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册