--------------------- PatchSet 5497 Date: 2007/08/26 01:57:53 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: Fix memory leak in ipcache. Members: src/ipcache.cc:1.9.2.41->1.9.2.42 Index: squid3/src/ipcache.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ipcache.cc,v retrieving revision 1.9.2.41 retrieving revision 1.9.2.42 diff -u -r1.9.2.41 -r1.9.2.42 --- squid3/src/ipcache.cc 24 Aug 2007 01:12:59 -0000 1.9.2.41 +++ squid3/src/ipcache.cc 26 Aug 2007 01:57:53 -0000 1.9.2.42 @@ -1,6 +1,6 @@ /* - * $Id: ipcache.cc,v 1.9.2.41 2007/08/24 01:12:59 amosjeffries Exp $ + * $Id: ipcache.cc,v 1.9.2.42 2007/08/26 01:57:53 amosjeffries Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -944,8 +944,11 @@ if(name[0] == '[') { char *tmp = xstrdup(&name[1]); tmp[strlen(tmp)-1] = '\0'; - if (!(ip = tmp)) + if (!(ip = tmp)) { + delete tmp; return NULL; + } + delete tmp; } else if (!(ip = name)) return NULL;