Changeset 83958 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Apr 23, 2020 8:24:40 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
r83235 r83958 943 943 944 944 ULONG cbAdpInfo = sizeof(IP_ADAPTER_INFO); 945 IP_ADAPTER_INFO *pAdpInfo = (IP_ADAPTER_INFO *)RTMemAlloc (cbAdpInfo);945 IP_ADAPTER_INFO *pAdpInfo = (IP_ADAPTER_INFO *)RTMemAllocZ(cbAdpInfo); 946 946 if (!pAdpInfo) 947 947 { … … 956 956 { 957 957 pAdpInfo = pAdpInfoNew; 958 RT_BZERO(pAdpInfo, cbAdpInfo); 958 959 dwRet = g_pfnGetAdaptersInfo(pAdpInfo, &cbAdpInfo); 959 960 } … … 965 966 /* If no network adapters available / present in the 966 967 * system we pretend success to not bail out too early. */ 967 dwRet = ERROR_SUCCESS; 968 RTMemFree(pAdpInfo); 969 pAdpInfo = NULL; 970 cbAdpInfo = 0; 971 dwRet = ERROR_SUCCESS; 968 972 } 969 973 if (dwRet != ERROR_SUCCESS) … … 994 998 INTERFACE_INFO aInterfaces[20] = {0}; 995 999 DWORD cbReturned = 0; 996 # ifdef RT_ARCH_ x861000 # ifdef RT_ARCH_X86 997 1001 /* Workaround for uninitialized variable used in memcpy in GetTcpipInterfaceList 998 1002 (NT4SP1 at least). It seems to be happy enough with garbages, no failure
Note:
See TracChangeset
for help on using the changeset viewer.