diff options
| author | Barton E. Schaefer <schaefer@zsh.org> | 2014-01-18 21:22:11 -0800 |
|---|---|---|
| committer | Barton E. Schaefer <schaefer@zsh.org> | 2014-01-18 21:22:11 -0800 |
| commit | 23f98c3e1d4792e32c616e1f73c383988bd86a9c (patch) | |
| tree | da55e3ad35ab3f47b0c52d8341919939a57ffa0c /Src/mem.c | |
| parent | 32283: fix crash in menu selection when number of terminal lines is small (diff) | |
| download | zsh-23f98c3e1d4792e32c616e1f73c383988bd86a9c.tar zsh-23f98c3e1d4792e32c616e1f73c383988bd86a9c.tar.gz zsh-23f98c3e1d4792e32c616e1f73c383988bd86a9c.tar.bz2 zsh-23f98c3e1d4792e32c616e1f73c383988bd86a9c.tar.lz zsh-23f98c3e1d4792e32c616e1f73c383988bd86a9c.tar.xz zsh-23f98c3e1d4792e32c616e1f73c383988bd86a9c.tar.zst zsh-23f98c3e1d4792e32c616e1f73c383988bd86a9c.zip | |
32285: restart the fheap search in freeheap if the current fheap arena is about to be discarded; fixes crash
Diffstat (limited to 'Src/mem.c')
| -rw-r--r-- | Src/mem.c | 9 |
1 files changed, 9 insertions, 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 |
