mirror of
https://github.com/libretro/RetroArch
synced 2025-04-03 01:21:10 +00:00
fix leak
This commit is contained in:
parent
e9afdb327e
commit
c5dfa314ad
@ -237,6 +237,11 @@ bool netplay_lan_ad_server(netplay_t *netplay)
|
|||||||
char reply_addr[NETPLAY_HOST_STR_LEN], port_str[6];
|
char reply_addr[NETPLAY_HOST_STR_LEN], port_str[6];
|
||||||
struct addrinfo *our_addr, hints = {0};
|
struct addrinfo *our_addr, hints = {0};
|
||||||
|
|
||||||
|
net_ifinfo_t interfaces;
|
||||||
|
|
||||||
|
if (!net_ifinfo_new(&interfaces))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (lan_ad_server_fd < 0 && !init_lan_ad_server_socket(netplay, RARCH_DEFAULT_PORT))
|
if (lan_ad_server_fd < 0 && !init_lan_ad_server_socket(netplay, RARCH_DEFAULT_PORT))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -277,11 +282,6 @@ bool netplay_lan_ad_server(netplay_t *netplay)
|
|||||||
|
|
||||||
strlcpy(reply_addr, ad_packet_buffer.address, NETPLAY_HOST_STR_LEN);
|
strlcpy(reply_addr, ad_packet_buffer.address, NETPLAY_HOST_STR_LEN);
|
||||||
|
|
||||||
net_ifinfo_t interfaces;
|
|
||||||
|
|
||||||
if (!net_ifinfo_new(&interfaces))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
for (k = 0; k < interfaces.size; k++)
|
for (k = 0; k < interfaces.size; k++)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
@ -349,6 +349,7 @@ bool netplay_lan_ad_server(netplay_t *netplay)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
net_ifinfo_free(&interfaces);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user