We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7e2ea3 commit b10022fCopy full SHA for b10022f
llvm/lib/Support/raw_socket_stream.cpp
@@ -245,8 +245,10 @@ ListeningSocket::~ListeningSocket() {
245
// Close the pipe's FDs in the destructor instead of within
246
// ListeningSocket::shutdown to avoid unnecessary synchronization issues that
247
// would occur as PipeFD's values would have to be changed to -1
248
- ::close(PipeFD[0]);
249
- ::close(PipeFD[1]);
+ if (PipeFD[0] != -1)
+ ::close(PipeFD[0]);
250
+ if (PipeFD[1] != -1)
251
+ ::close(PipeFD[1]);
252
}
253
254
//===----------------------------------------------------------------------===//
0 commit comments