mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
branches/zip: mem_heap_block_free(): Fix a bug introduced in r909:
invoke mem_erase_buf() only after interpreting block->buf_block.
This commit is contained in:
parent
968de5a54e
commit
47e6669d94
1 changed files with 7 additions and 8 deletions
|
@ -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
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
|
Loading…
Reference in a new issue