mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Merge pull request #294 from devnexen/addrinfo_leak_fix
- Fix addrinfo leaks.
This commit is contained in:
commit
3adb4a62d7
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue