1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

fuzz: fix file descriptor leak

This commit is contained in:
Samuel Tardieu 2024-01-05 11:04:16 +01:00
parent 2ba9501013
commit 4343ba6695

View file

@ -149,6 +149,10 @@ where
exit_code: -1, exit_code: -1,
}; };
} }
unsafe {
close(original_stdout_fd);
close(original_stderr_fd);
}
// Restore the original stdin if it was modified // Restore the original stdin if it was modified
if let Some(fd) = original_stdin_fd { if let Some(fd) = original_stdin_fd {