mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-27 07:30:12 +00:00
Robustify: only close zero_fd if actually allocated
This commit is contained in:
parent
452b7b9638
commit
6b9f8e85c5
@ -231,7 +231,10 @@ void vm_exit(void)
|
|||||||
{
|
{
|
||||||
#ifdef HAVE_MMAP_VM
|
#ifdef HAVE_MMAP_VM
|
||||||
#ifndef zero_fd
|
#ifndef zero_fd
|
||||||
|
if (zero_fd != -1) {
|
||||||
close(zero_fd);
|
close(zero_fd);
|
||||||
|
zero_fd = -1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user