crash_generation: fix bad call to close

If signal_fd is -1 still, we end up calling close(-1).  Not generally
a problem, but it's bad form, and coverity is upset by it.

Change-Id: I46f9c7ca4be7b43af5b609dd8e3f03a0700af418
Reviewed-on: https://chromium-review.googlesource.com/414544
Reviewed-by: Primiano Tucci <primiano@chromium.org>
This commit is contained in:
Mike Frysinger 2016-11-23 18:03:18 -05:00
parent 596fbb61bc
commit c13d6fa467

View File

@ -255,7 +255,7 @@ CrashGenerationServer::ClientEvent(short revents)
} }
if (crashing_pid == -1 || signal_fd == -1) { if (crashing_pid == -1 || signal_fd == -1) {
if (signal_fd) if (signal_fd != -1)
close(signal_fd); close(signal_fd);
return true; return true;
} }