From e9d0d247be909ade39f213a3e2915aa262755a78 Mon Sep 17 00:00:00 2001 From: Joseph Klix Date: Thu, 14 Mar 2024 18:38:59 -0500 Subject: [PATCH] only call curl_global_cleanup once (#2890) --- src/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp b/src/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp index c4c3cd30f70..c1d3cdb4aa2 100644 --- a/src/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp +++ b/src/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp @@ -530,8 +530,11 @@ void CurlHttpClient::InitGlobalState() void CurlHttpClient::CleanupGlobalState() { - curl_global_cleanup(); - isInit = false; + if (isInit) + { + curl_global_cleanup(); + isInit = false; + } } Aws::String CurlInfoTypeToString(curl_infotype type)