Skip to content

Commit 2f8a68b

Browse files
committed
Fix typo in fd cleanup
1 parent 0bec80f commit 2f8a68b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,10 @@ bool SymbolizerProcess::Restart() {
539539
CloseFile(input_fd_);
540540
if (output_fd_ != kInvalidFd)
541541
CloseFile(output_fd_);
542-
if (child_stdin_fd_ != kInvalidFd)
543-
CloseFile(output_fd_);
542+
if (child_stdin_fd_ != kInvalidFd) {
543+
CloseFile(child_stdin_fd_);
544+
child_stdin_fd_ = kInvalidFd; // Don't free in destructor
545+
}
544546
return StartSymbolizerSubprocess();
545547
}
546548

0 commit comments

Comments
 (0)