mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-26 04:30:27 +01:00
32285: restart the fheap search in freeheap if the current fheap arena is about to be discarded; fixes crash
This commit is contained in:
parent
1584318b97
commit
23f98c3e1d
2 changed files with 16 additions and 0 deletions
|
|
@ -367,6 +367,15 @@ freeheap(void)
|
|||
}
|
||||
#endif
|
||||
} else {
|
||||
if (h == fheap && h != heaps) {
|
||||
/*
|
||||
* When deallocating the last arena with free space,
|
||||
* loop back through the list to find another one.
|
||||
*/
|
||||
fheap = NULL;
|
||||
hn = heaps;
|
||||
continue;
|
||||
}
|
||||
#ifdef USE_MMAP
|
||||
munmap((void *) h, h->size);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue