fix FileLock: fd could be closed twice (#21362)

pull/21374/head
Dean Lee 2021-06-23 05:05:48 +08:00 committed by GitHub
parent ac71384a28
commit 766f3281bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -134,7 +134,6 @@ class FileLock {
return;
}
if (HANDLE_EINTR(flock(fd_, op_)) < 0) {
close(fd_);
LOGE("Failed to lock file %s, errno=%d", fn_.c_str(), errno);
}
}