summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-21 20:07:02 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-21 20:07:02 +0000
commit45a193a034c4177574c13ce6c207cb5458bbea4f (patch)
tree6778839d4a3162ad13e8164823ad7b6c86486368
parentd425feaf99d5de254e4b33d0abfeec2b0727bbf7 (diff)
downloadchromium_src-45a193a034c4177574c13ce6c207cb5458bbea4f.zip
chromium_src-45a193a034c4177574c13ce6c207cb5458bbea4f.tar.gz
chromium_src-45a193a034c4177574c13ce6c207cb5458bbea4f.tar.bz2
mac/rlz: Correctly check for fd existence
Found while looking at this file for http://crbug.com/143950, but I don't think this causes that bug. BUG=143950 Review URL: https://chromiumcodereview.appspot.com/10827449 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152616 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--rlz/mac/lib/rlz_value_store_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/rlz/mac/lib/rlz_value_store_mac.mm b/rlz/mac/lib/rlz_value_store_mac.mm
index 11a3c3d..b1d082d 100644
--- a/rlz/mac/lib/rlz_value_store_mac.mm
+++ b/rlz/mac/lib/rlz_value_store_mac.mm
@@ -296,7 +296,7 @@ bool RecursiveCrossProcessLock::TryGetCrossProcessLock(
}
void RecursiveCrossProcessLock::ReleaseLock() {
- if (file_lock_) {
+ if (file_lock_ != -1) {
ignore_result(HANDLE_EINTR(flock(file_lock_, LOCK_UN)));
ignore_result(HANDLE_EINTR(close(file_lock_)));
file_lock_ = -1;