mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
(net_natt.c) Free net_addrinfo before going out of scope
This commit is contained in:
parent
8eb32fa824
commit
ea56249661
1 changed files with 5 additions and 3 deletions
|
@ -99,11 +99,12 @@ static bool natt_open_port(struct natt_status *status,
|
|||
{
|
||||
#ifndef HAVE_SOCKET_LEGACY
|
||||
#if HAVE_MINIUPNPC
|
||||
int r;
|
||||
char host[PATH_MAX_LENGTH], ext_host[PATH_MAX_LENGTH],
|
||||
port_str[6], ext_port_str[6];
|
||||
const char *proto_str;
|
||||
struct addrinfo hints = {0}, *ext_addrinfo;
|
||||
int r;
|
||||
struct addrinfo hints = {0};
|
||||
const char *proto_str = NULL;
|
||||
struct addrinfo *ext_addrinfo = NULL;
|
||||
|
||||
/* if NAT traversal is uninitialized or unavailable, oh well */
|
||||
if (!urls.controlURL || !urls.controlURL[0])
|
||||
|
@ -156,6 +157,7 @@ static bool natt_open_port(struct natt_status *status,
|
|||
return false;
|
||||
}
|
||||
|
||||
freeaddrinfo_retro(ext_addrinfo);
|
||||
return true;
|
||||
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue