BLI_memarena: unpoison memory before freeing it
This commit is contained in:
parent
4878b29b49
commit
a7542b9e2b
|
@ -77,6 +77,10 @@ static void memarena_buf_free_all(struct MemBuf *mb)
|
|||
{
|
||||
while (mb != NULL) {
|
||||
struct MemBuf *mb_next = mb->next;
|
||||
|
||||
/* Unpoison memory because MEM_freeN might overwrite it. */
|
||||
ASAN_UNPOISON_MEMORY_REGION(mb, (uint)MEM_allocN_len(mb));
|
||||
|
||||
MEM_freeN(mb);
|
||||
mb = mb_next;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue