Merge pull request #1478 from magcius/memmap-cleanup MemArena: Fix a memory leak caused by pointer confusion