{
     // Free memory
     curl_easy_cleanup(CurlEasyHandle);
-    free(CurlErrBuff);
 }
 
 
     }
     if ( (curl_err_code = curl_easy_getinfo(CurlEasyHandle,CURLINFO_RESPONSE_CODE,&curl_info)) != 0 )
     {
-         Log->print_curl_error(url,curl_err_code);
+        Log->print_curl_error(url,curl_err_code);
         return -1;
     }
 
 
     int ProxyPort;
     CURL* CurlEasyHandle;
     std::string CurlWritedataBuff;
-    char* CurlErrBuff;
+    char CurlErrBuff[CURL_ERROR_SIZE];
 
     void set_curl_url(const std::string& url);
     void set_curl_auth(const std::string& username, const std::string& password);