--------------------- PatchSet 5106 Date: 2007/07/29 04:51:00 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: Minor fixes for Solaris. Members: include/IPAddress.h:1.1.2.23->1.1.2.24 lib/IPAddress.cc:1.1.2.56->1.1.2.57 Index: squid3/include/IPAddress.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/include/Attic/IPAddress.h,v retrieving revision 1.1.2.23 retrieving revision 1.1.2.24 diff -u -r1.1.2.23 -r1.1.2.24 --- squid3/include/IPAddress.h 8 Jun 2007 13:29:10 -0000 1.1.2.23 +++ squid3/include/IPAddress.h 29 Jul 2007 04:51:00 -0000 1.1.2.24 @@ -1,6 +1,6 @@ /* - * $Id: IPAddress.h,v 1.1.2.23 2007/06/08 13:29:10 amosjeffries Exp $ + * $Id: IPAddress.h,v 1.1.2.24 2007/07/29 04:51:00 amosjeffries Exp $ * * DEBUG: section 14 IP Storage and Handling * AUTHOR: Amos Jeffries @@ -53,7 +53,7 @@ #include /// Test to verify the build configure options are correct. -// COMMENT THE FOLLOW LINE TO TEST: +// COMMENT THE FOLLOWING LINE TO TEST: /* // the use of #warning and #error is intentional to stop the build process. #if USE_IPV6 Index: squid3/lib/IPAddress.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/lib/Attic/IPAddress.cc,v retrieving revision 1.1.2.56 retrieving revision 1.1.2.57 diff -u -r1.1.2.56 -r1.1.2.57 --- squid3/lib/IPAddress.cc 15 Jul 2007 07:17:23 -0000 1.1.2.56 +++ squid3/lib/IPAddress.cc 29 Jul 2007 04:51:04 -0000 1.1.2.57 @@ -1,6 +1,6 @@ /* - * $Id: IPAddress.cc,v 1.1.2.56 2007/07/15 07:17:23 amosjeffries Exp $ + * $Id: IPAddress.cc,v 1.1.2.57 2007/07/29 04:51:04 amosjeffries Exp $ * * DEBUG: section 14 IP Storage and Handling * AUTHOR: Amos Jeffries @@ -450,8 +450,10 @@ if ( (err = getaddrinfo(s, NULL, &want, &res)) != 0) { debugs(14,1, HERE << "Given Bad IP '" << s << "': " << gai_strerror(err) ); /* free the memory getaddrinfo dynamically allocated. */ - freeaddrinfo(res); - res = NULL; + if(res) { + freeaddrinfo(res); + res = NULL; + } return false; }