--------------------- PatchSet 5933 Date: 2007/10/08 12:28:55 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: Fix occasional segfault in ipcache. Members: src/ipcache.cc:1.9.2.46->1.9.2.47 Index: squid3/src/ipcache.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ipcache.cc,v retrieving revision 1.9.2.46 retrieving revision 1.9.2.47 diff -u -r1.9.2.46 -r1.9.2.47 --- squid3/src/ipcache.cc 21 Sep 2007 12:34:15 -0000 1.9.2.46 +++ squid3/src/ipcache.cc 8 Oct 2007 12:28:55 -0000 1.9.2.47 @@ -1,6 +1,6 @@ /* - * $Id: ipcache.cc,v 1.9.2.46 2007/09/21 12:34:15 amosjeffries Exp $ + * $Id: ipcache.cc,v 1.9.2.47 2007/10/08 12:28:55 amosjeffries Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -137,6 +137,16 @@ static void ipcacheRelease(ipcache_entry * i, bool dofree) { + if(!i) { + debugs(14, 0, "ipcacheRelease: Releasing entry with i="); + return; + } + + if(!i || !i->hash.key) { + debugs(14, 0, "ipcacheRelease: Releasing entry without hash link!"); + return; + } + debugs(14, 3, "ipcacheRelease: Releasing entry for '" << (const char *) i->hash.key << "'"); hash_remove_link(ip_table, (hash_link *) i);