Unverified Commit 445af7ef authored by Shinichiro Hamaji's avatar Shinichiro Hamaji Committed by GitHub

Merge pull request #508 from xiaosuo/close

Don't call close(2) more than once
parents 1b7d5414 a35e612c
...@@ -374,7 +374,7 @@ struct FileDescriptor { ...@@ -374,7 +374,7 @@ struct FileDescriptor {
explicit FileDescriptor(int fd) : fd_(fd) {} explicit FileDescriptor(int fd) : fd_(fd) {}
~FileDescriptor() { ~FileDescriptor() {
if (fd_ >= 0) { if (fd_ >= 0) {
NO_INTR(close(fd_)); close(fd_);
} }
} }
int get() { return fd_; } int get() { return fd_; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment