Robustify: only close zero_fd if actually allocated

This commit is contained in:
gbeauche 2005-06-06 19:40:17 +00:00
parent 452b7b9638
commit 6b9f8e85c5

View File

@ -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
}