commit | 5d9ba9ea702a4d20b99639996b8bd27f121d5bd7 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Tue Nov 05 16:12:18 2019 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Tue Nov 05 16:12:18 2019 +0000 |
tree | 2a7e44d156dac92caacf04f9c6c9c3540638a03f | |
parent | 590bdbe6e938e1bc53b09674b7eedde440863f11 [diff] | |
parent | 89b09198b90c6ae98c378c9a45d23674672b6019 [diff] |
Merge "Close descriptor in ScopeFd destructor"
diff --git a/libc/private/ScopedFd.h b/libc/private/ScopedFd.h index 9b1cd9d..1cec916 100644 --- a/libc/private/ScopedFd.h +++ b/libc/private/ScopedFd.h
@@ -46,7 +46,7 @@ } void reset(int fd = -1) { - if (fd != -1) { + if (fd_ != -1) { ErrnoRestorer e; close(fd_); }