Fixed memory leak in curl (#3995)

* Fixed memory leak in curl

* fixed documentation in unique_handle.hpp
This commit is contained in:
Larry Osterman 2022-10-04 19:50:42 -07:00 committed by GitHub
parent dd2d050ec8
commit 895a1f9f2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 5 deletions

View File

@ -15,7 +15,7 @@ namespace Azure { namespace Core { namespace _internal {
*
* template <> struct UniqueHandleHelper<CURL>
* {
* using type = BasicUniqueHandle<CURL, curl_free>;
* using type = BasicUniqueHandle<CURL, curl_easy_cleanup>;
* };
*
* Note that for some types (HINTERNET for example), the helper needs to be a bit more

View File

@ -40,9 +40,7 @@ namespace Azure { namespace Core {
*/
template <> struct UniqueHandleHelper<CURL>
{
static void FreeHandle(CURL* obj) { curl_free(obj); }
using type = BasicUniqueHandle<CURL, FreeHandle>;
using type = BasicUniqueHandle<CURL, curl_easy_cleanup>;
};
} // namespace _internal

View File

@ -41,7 +41,7 @@ stages:
LiveTestCtestRegex: azure-core.|json-test
LiveTestTimeoutInMinutes: 90 # default is 60 min. We need a little longer on worst case for Win+jsonTests
LineCoverageTarget: 93
BranchCoverageTarget: 55
BranchCoverageTarget: 50
PreTestSteps:
- pwsh: |
docker build -t squid-local $(Build.SourcesDirectory)/sdk/core/azure-core/test/ut/proxy_tests/localproxy