From: Alex Rousskov Date: Fri, 27 Dec 2013 18:34:41 +0000 (-0700) Subject: Check that StoreEntry lock does not go negative X-Git-Tag: SQUID_3_5_0_1~444^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c47b98acba98f24086073c86071ea5711993cd59;p=thirdparty%2Fsquid.git Check that StoreEntry lock does not go negative which may happen if unlocked (and possibly deleted) entry is unlocked (again). --- diff --git a/src/store.cc b/src/store.cc index 3dcff35f79..3373b13557 100644 --- a/src/store.cc +++ b/src/store.cc @@ -542,6 +542,7 @@ StoreEntry::unlock(const char *context) { debugs(20, 3, (context ? context : "somebody") << " unlocking key " << getMD5Text() << ' ' << *this); + assert(lock_count > 0); --lock_count; if (lock_count)