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,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;
}