mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
(net_natt.c) Free net_addrinfo before going out of scope
This commit is contained in:
parent
8eb32fa824
commit
ea56249661
@ -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…
x
Reference in New Issue
Block a user