1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
diff --git a/netinet/sctp_bsd_addr.c b/netinet/sctp_bsd_addr.c
--- a/netinet/sctp_bsd_addr.c
+++ b/netinet/sctp_bsd_addr.c
@@ -304,14 +304,7 @@ sctp_is_vmware_interface(struct ifnet *ifn)
#endif
#if defined(_WIN32) && defined(__Userspace__)
-#ifdef MALLOC
-#undef MALLOC
-#define MALLOC(x) HeapAlloc(GetProcessHeap(), 0, (x))
-#endif
-#ifdef FREE
-#undef FREE
-#define FREE(x) HeapFree(GetProcessHeap(), 0, (x))
-#endif
+#define SCTP_BSD_FREE(x) HeapFree(GetProcessHeap(), 0, (x))
static void
sctp_init_ifns_for_vrf(int vrfid)
{
@@ -341,7 +334,7 @@ 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);
+ SCTP_BSD_FREE(pAdapterAddrs);
return;
}
/* Enumerate through each returned adapter and save its information */
@@ -366,7 +359,7 @@ sctp_init_ifns_for_vrf(int vrfid)
}
}
}
- FREE(pAdapterAddrs);
+ SCTP_BSD_FREE(pAdapterAddrs);
#endif
#ifdef INET6
AdapterAddrsSize = 0;
@@ -386,7 +379,7 @@ 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);
+ SCTP_BSD_FREE(pAdapterAddrs);
return;
}
/* Enumerate through each returned adapter and save its information */
@@ -408,7 +401,7 @@ sctp_init_ifns_for_vrf(int vrfid)
}
}
}
- FREE(pAdapterAddrs);
+ SCTP_BSD_FREE(pAdapterAddrs);
#endif
}
#elif defined(__Userspace__)
|