mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 05:46:58 +00:00
Issue #2925 followup - Restore previous GlobalFree behavior from before SCTP upgrade in sctp_bsd_addr.c
This commit is contained in:
@@ -336,7 +336,8 @@ sctp_init_ifns_for_vrf(int vrfid)
|
||||
/* Get actual adapter information */
|
||||
if ((Err = GetAdaptersAddresses(AF_INET, 0, NULL, pAdapterAddrs, &AdapterAddrsSize)) != ERROR_SUCCESS) {
|
||||
SCTP_PRINTF("GetAdaptersV4Addresses() failed with error code %d\n", Err);
|
||||
FREE(pAdapterAddrs);
|
||||
if (pAdapterAddrs)
|
||||
GlobalFree(pAdapterAddrs);
|
||||
return;
|
||||
}
|
||||
/* Enumerate through each returned adapter and save its information */
|
||||
@@ -361,7 +362,8 @@ sctp_init_ifns_for_vrf(int vrfid)
|
||||
}
|
||||
}
|
||||
}
|
||||
FREE(pAdapterAddrs);
|
||||
if (pAdapterAddrs)
|
||||
GlobalFree(pAdapterAddrs);
|
||||
#endif
|
||||
#ifdef INET6
|
||||
AdapterAddrsSize = 0;
|
||||
@@ -381,7 +383,8 @@ sctp_init_ifns_for_vrf(int vrfid)
|
||||
/* Get actual adapter information */
|
||||
if ((Err = GetAdaptersAddresses(AF_INET6, 0, NULL, pAdapterAddrs, &AdapterAddrsSize)) != ERROR_SUCCESS) {
|
||||
SCTP_PRINTF("GetAdaptersV6Addresses() failed with error code %d\n", Err);
|
||||
FREE(pAdapterAddrs);
|
||||
if (pAdapterAddrs)
|
||||
GlobalFree(pAdapterAddrs);
|
||||
return;
|
||||
}
|
||||
/* Enumerate through each returned adapter and save its information */
|
||||
@@ -403,7 +406,8 @@ sctp_init_ifns_for_vrf(int vrfid)
|
||||
}
|
||||
}
|
||||
}
|
||||
FREE(pAdapterAddrs);
|
||||
if (pAdapterAddrs)
|
||||
GlobalFree(pAdapterAddrs);
|
||||
#endif
|
||||
}
|
||||
#elif defined(__Userspace__)
|
||||
|
||||
Reference in New Issue
Block a user