From: Guus Sliepen Date: Tue, 18 Nov 2008 15:11:27 +0000 (+0000) Subject: Prevent freeing a NULL pointer when a hostname is unresolvable. X-Git-Tag: release-1.0.9~13 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=a36259435c17f76cf12476234a56f40fcd8faf41;p=tinc Prevent freeing a NULL pointer when a hostname is unresolvable. --- diff --git a/src/net_socket.c b/src/net_socket.c index bf5130d6..753229b4 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -300,7 +300,8 @@ begin: } if(!c->outgoing->aip) { - freeaddrinfo(c->outgoing->ai); + if(c->outgoing->ai) + freeaddrinfo(c->outgoing->ai); c->outgoing->ai = NULL; goto begin; }