BLI_memarena: unpoison memory before freeing it

This commit is contained in:
Jacques Lucke 2019-05-16 18:19:04 +02:00
parent 4878b29b49
commit a7542b9e2b
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}