Commit 975c118a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Simplify free

parent c345ce53
......@@ -206,16 +206,12 @@ static void WSAAPI freeaddrinfo (struct addrinfo *res)
static void freeaddrinfo (struct addrinfo *res)
#endif
{
if (res != NULL)
{
if (res->ai_canonname != NULL)
if (res == NULL)
return;
free (res->ai_canonname);
if (res->ai_addr != NULL)
free (res->ai_addr);
if (res->ai_next != NULL)
free (res->ai_next);
free (res);
}
}
......
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