Commit c8559db5 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Only free addrinfo if it is non-NULL

parent 1f5526a7
......@@ -108,7 +108,7 @@ int
VSS_resolver_socktype(const char *addr, const char *def_port,
vss_resolved_f *func, void *priv, const char **err, int socktype)
{
struct addrinfo hints, *res0, *res;
struct addrinfo hints, *res0 = NULL, *res;
struct suckaddr *vsa;
char *h;
char *adp, *hop;
......@@ -143,7 +143,8 @@ VSS_resolver_socktype(const char *addr, const char *def_port,
break;
}
}
freeaddrinfo(res0);
if (res0 != NULL)
freeaddrinfo(res0);
return (ret);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment