From: Guus Sliepen Date: Tue, 7 Mar 2017 18:19:19 +0000 (+0100) Subject: Use free_known_addresses() to free memory allocated by get_known_addresses(). X-Git-Tag: release-1.1pre15~43 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=3fc678a8df4d6c057ef9f2c602b86ed106651e68;hp=3fc678a8df4d6c057ef9f2c602b86ed106651e68;p=tinc Use free_known_addresses() to free memory allocated by get_known_addresses(). We know what struct addrinfo looks like, but the standard says nothing about how it is allocated. So we cannot trust freeaddrinfo() to work correctly on the struct addrinfo list we allocated ourselves in get_known_addresses(). To make a distinction by allocations from the latter and from str2addrinfo(), we keep two pointers (*ai and *kai) in struct outgoing, and use the freeing function that is appropriate for each. ---