Skip to content

Commit

Permalink
Merge pull request #5787 from samueltardieu/fuzz-fix-fd-leak
Browse files Browse the repository at this point in the history
fuzz: fix file descriptor leak
  • Loading branch information
sylvestre authored Jan 5, 2024
2 parents 2ba9501 + 4343ba6 commit b61e859
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fuzz/fuzz_targets/fuzz_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ where
exit_code: -1,
};
}
unsafe {
close(original_stdout_fd);
close(original_stderr_fd);
}

// Restore the original stdin if it was modified
if let Some(fd) = original_stdin_fd {
Expand Down

0 comments on commit b61e859

Please sign in to comment.