tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

win32-free.patch (1716B)


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