From e0f6d90e7fac4c567900e98c354af979c97f8d59 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 22 Jan 2018 18:05:09 +0100 Subject: [PATCH] Fix calling freeaddrinfo() on the wrong pointer. Thanks to Todd C. Miller for finding this issue. --- src/address_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/address_cache.c b/src/address_cache.c index 552e1f2..42b671b 100644 --- a/src/address_cache.c +++ b/src/address_cache.c @@ -178,8 +178,8 @@ const sockaddr_t *get_recent_address(address_cache_t *cache) { cache->aip = cache->aip->ai_next; if(!cache->aip) { - freeaddrinfo(cache->aip); - cache->aip = NULL; + freeaddrinfo(cache->ai); + cache->ai = cache->aip = NULL; } return sa; -- 2.25.1