Don't double-free net_ifinfo structure.

This commit is contained in:
Gregor Richards 2016-11-30 19:21:33 -05:00
parent b3e6a8fe6e
commit 4ad1aa7eff

View File

@ -175,10 +175,7 @@ bool natt_open_port_any(struct natt_status *status, uint16_t port, enum socket_p
if ((list = (struct net_ifinfo *) calloc(1, sizeof(struct net_ifinfo))) == NULL)
return false;
if (!net_ifinfo_new(list))
{
free(list);
return false;
}
/* loop through them */
for (i = 0; i < list->size; i++)