tsan: fix malloc/munmap mismatch