Prevent freeing a NULL pointer when a hostname is unresolvable.

This commit is contained in:
Guus Sliepen 2008-11-18 15:11:27 +00:00
parent 4a1740ede7
commit a36259435c

View file

@ -300,6 +300,7 @@ begin:
} }
if(!c->outgoing->aip) { if(!c->outgoing->aip) {
if(c->outgoing->ai)
freeaddrinfo(c->outgoing->ai); freeaddrinfo(c->outgoing->ai);
c->outgoing->ai = NULL; c->outgoing->ai = NULL;
goto begin; goto begin;