From a4aafa410af476e4c263d1ea2b355ec77b3d93a3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 9 Apr 2020 15:28:10 +0800 Subject: [PATCH] Fix initial value --- nel/include/nel/web/http_client_curl.h | 2 +- nel/src/web/http_client_curl.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nel/include/nel/web/http_client_curl.h b/nel/include/nel/web/http_client_curl.h index 77cf335ca..e130cd768 100644 --- a/nel/include/nel/web/http_client_curl.h +++ b/nel/include/nel/web/http_client_curl.h @@ -34,7 +34,7 @@ class CCurlHttpClient public: /// Constructor - CCurlHttpClient() {} + CCurlHttpClient() : _CurlStruct(NULL) {} /// Connect to an http server (string by val is intended). If you specify a whole URL, an attempt will be made to determine the server. bool connect(const std::string &server); diff --git a/nel/src/web/http_client_curl.cpp b/nel/src/web/http_client_curl.cpp index 1ec244cd2..253588972 100644 --- a/nel/src/web/http_client_curl.cpp +++ b/nel/src/web/http_client_curl.cpp @@ -192,6 +192,7 @@ bool CCurlHttpClient::receive(string &res, bool verbose) void CCurlHttpClient::disconnect() { curl_easy_cleanup(_Curl); + _Curl = NULL; curl_global_cleanup(); }