From: Amos Jeffries Date: Thu, 8 Jan 2015 22:11:24 +0000 (-0800) Subject: Bug 3760: fix typo in earlier patch X-Git-Tag: merge-candidate-3-v1~366 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8b96fe8612f12eec06ea59b2022ca5ecdc779878;p=thirdparty%2Fsquid.git Bug 3760: fix typo in earlier patch --- diff --git a/src/ip/Address.cc b/src/ip/Address.cc index 88d0723e57..59942d1151 100644 --- a/src/ip/Address.cc +++ b/src/ip/Address.cc @@ -393,6 +393,7 @@ Ip::Address::lookupHostIP(const char *s, bool nodns) return false; } + struct addrinfo *resHead = res; // we need to free the whole list later if (!Ip::EnableIpv6) { // if we are IPv6-disabled, use first-IPv4 instead of first-IP. struct addrinfo *maybeIpv4 = res; @@ -415,7 +416,7 @@ Ip::Address::lookupHostIP(const char *s, bool nodns) port(portSaved); /* free the memory getaddrinfo() dynamically allocated. */ - freeaddrinfo(res); + freeaddrinfo(resHead); return true; }