Merge: Fix potential resource leak in test_mmap.