- Fix addrinfo leaks.

This commit is contained in:
David Carlier 2018-04-27 23:06:24 +01:00
parent 1e3135d4fc
commit 2f0c2f8981

View file

@ -436,6 +436,8 @@ NET_StringToSockaddr(const char *s, struct sockaddr_storage *sadr)
return 0;
}
freeaddrinfo(resultp);
return true;
}
@ -706,6 +708,7 @@ NET_SendPacket(netsrc_t sock, int length, void *data, netadr_t to)
/* sockaddr_in6 should now have a valid scope_id. */
memcpy(s6, res->ai_addr, res->ai_addrlen);
freeaddrinfo(res);
}
else
{