From 45a193a034c4177574c13ce6c207cb5458bbea4f Mon Sep 17 00:00:00 2001 From: "thakis@chromium.org" Date: Tue, 21 Aug 2012 20:07:02 +0000 Subject: 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 --- rlz/mac/lib/rlz_value_store_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rlz/mac') 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; -- cgit v1.1