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

Merge pull request #5787 from samueltardieu/fuzz-fix-fd-leak

fuzz: fix file descriptor leak
This commit is contained in:
Sylvestre Ledru 2024-01-05 12:38:26 +01:00 committed by GitHub
commit b61e859467
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 {