]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
complain if lockcount about to go 'negative'
authorwessels <>
Fri, 21 Feb 1997 04:02:38 +0000 (04:02 +0000)
committerwessels <>
Fri, 21 Feb 1997 04:02:38 +0000 (04:02 +0000)
src/ipcache.cc

index 6b9cf4102cd8e5c9645bb1aa7b92d3c8721e157e..12f1c30a03c5dff250e021844eb6b346ffec61ce 100644 (file)
@@ -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);