Simplufy munmap() error handling