Changeset 102563 in vbox
- Timestamp:
- Dec 11, 2023 9:14:20 AM (15 months ago)
- svn:sync-xref-src-repo-rev:
- 160709
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/generic/http-curl.cpp
r98103 r102563 301 301 typedef void (* PFNLIBPROXYFACTORYDTOR)(PLIBPROXYFACTORY); 302 302 typedef char ** (* PFNLIBPROXYFACTORYGETPROXIES)(PLIBPROXYFACTORY, const char *); 303 typedef void (* PFNLIBPROXYFACTORYFREEPROXIES)(char **); 303 304 #endif 304 305 … … 364 365 static PFNLIBPROXYFACTORYDTOR g_pfnLibProxyFactoryDtor = NULL; 365 366 static PFNLIBPROXYFACTORYGETPROXIES g_pfnLibProxyFactoryGetProxies = NULL; 367 /** Note: Only valid for libproxy >= 0.4.16. */ 368 static PFNLIBPROXYFACTORYFREEPROXIES g_pfnLibProxyFactoryFreeProxies = NULL; 366 369 /** @} */ 367 370 #endif … … 1065 1068 if (RT_SUCCESS(rc)) 1066 1069 { 1070 /* libproxy < 0.4.16 does not have this function, so this is not fatal if not found. */ 1071 RTLdrGetSymbol(hMod, "px_proxy_factory_free_proxies", (void **)&g_pfnLibProxyFactoryFreeProxies); 1072 } 1073 if (RT_SUCCESS(rc)) 1074 { 1067 1075 RTMEM_WILL_LEAK(hMod); 1068 1076 g_hLdrLibProxy = hMod; … … 1098 1106 { 1099 1107 char **papszProxies = g_pfnLibProxyFactoryGetProxies(pFactory, pszUrl); 1100 g_pfnLibProxyFactoryDtor(pFactory);1101 1108 if (papszProxies) 1102 1109 { … … 1120 1127 } 1121 1128 1122 /* free the result. */ 1123 for (unsigned i = 0; papszProxies[i]; i++) 1124 free(papszProxies[i]); 1125 free(papszProxies); 1129 /* Free the result. */ 1130 if (g_pfnLibProxyFactoryFreeProxies) /* libproxy >= 0.4.16. */ 1131 { 1132 g_pfnLibProxyFactoryFreeProxies(papszProxies); 1133 } 1134 else 1135 { 1136 for (unsigned i = 0; papszProxies[i]; i++) 1137 free(papszProxies[i]); 1138 free(papszProxies); 1139 } 1140 papszProxies = NULL; 1126 1141 } 1142 1143 g_pfnLibProxyFactoryDtor(pFactory); 1127 1144 } 1128 1145 }
Note:
See TracChangeset
for help on using the changeset viewer.