mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-08-09 03:25:04 +00:00
Robustify: only close zero_fd if actually allocated
This commit is contained in:
@@ -231,7 +231,10 @@ void vm_exit(void)
|
||||
{
|
||||
#ifdef HAVE_MMAP_VM
|
||||
#ifndef zero_fd
|
||||
close(zero_fd);
|
||||
if (zero_fd != -1) {
|
||||
close(zero_fd);
|
||||
zero_fd = -1;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user