]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Marcin Wisnicki <mwisnicki@gmail.com>
authorAmos Jeffries <amosjeffries@squid-cache.org>
Mon, 25 Oct 2010 04:14:50 +0000 (22:14 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Mon, 25 Oct 2010 04:14:50 +0000 (22:14 -0600)
Bug 3088: dnsserver is segfaulting

src/dnsserver.cc

index 919b58f1bf4d7002fc45f16d2d12aa5bf4192c7a..4cde6f0ec5aa33747decf68f13620310d68df356 100644 (file)
@@ -201,8 +201,10 @@ lookup(const char *buf)
     hints.ai_flags = AI_CANONNAME;
 
     for (;;) {
-        freeaddrinfo(AI);
-        AI = NULL;
+        if (AI != NULL) {
+            freeaddrinfo(AI);
+            AI = NULL;
+        }
 
         if ( 0 == (res = getaddrinfo(buf,NULL,&hints,&AI)) )
             break;