Commit 47e6669d authored by marko's avatar marko

branches/zip: mem_heap_block_free(): Fix a bug introduced in r909:

invoke mem_erase_buf() only after interpreting block->buf_block.
parent 968de5a5
......@@ -511,14 +511,6 @@ mem_heap_block_free(
init_block = block->init_block;
block->magic_n = MEM_FREED_BLOCK_MAGIC_N;
#ifdef UNIV_MEM_DEBUG
/* In the debug version we set the memory to a random combination
of hex 0xDE and 0xAD. */
mem_erase_buf((byte*)block, len);
#endif
if (init_block) {
/* Do not have to free: do nothing */
......@@ -536,6 +528,13 @@ mem_heap_block_free(
mem_area_free(block, mem_comm_pool);
}
}
#ifdef UNIV_MEM_DEBUG
/* In the debug version we set the memory to a random combination
of hex 0xDE and 0xAD. */
mem_erase_buf((byte*)block, len);
#endif
}
/**********************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment