From: wessels <> Date: Fri, 21 Feb 1997 04:02:38 +0000 (+0000) Subject: complain if lockcount about to go 'negative' X-Git-Tag: SQUID_3_0_PRE1~5098 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=175414a0af06bb2cc037c42422643210744eb4c9;p=thirdparty%2Fsquid.git complain if lockcount about to go 'negative' --- diff --git a/src/ipcache.cc b/src/ipcache.cc index 6b9cf4102c..12f1c30a03 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -1,6 +1,6 @@ /* - * $Id: ipcache.cc,v 1.104 1997/02/20 20:22:48 wessels Exp $ + * $Id: ipcache.cc,v 1.105 1997/02/20 21:02:38 wessels Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -1014,6 +1014,10 @@ ipcacheLockEntry(ipcache_entry * i) static void ipcacheUnlockEntry(ipcache_entry * i) { + if (i->locks == 0) { + debug_trap("ipcacheUnlockEntry: Entry has no locks"); + return; + } i->locks--; if (ipcacheExpiredEntry(i)) ipcache_release(i);