Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/netwerk/sctp/src/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  win32-free.patch   Sprache: unbekannt

 
Spracherkennung für: .patch vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

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__)

[ Dauer der Verarbeitung: 0.54 Sekunden  ]