curl_easy_escape() and curl_unescape() allocate new memory for the char. std::string constructor copies the data from char, and the char* needs to be freed afterwards, which it was not and therefore it was leaking.
Also, Is there a reason for using curl_unescape() instead of curl_easy_unescape()?
curl_easy_escape() and curl_unescape() allocate new memory for the char. std::string constructor copies the data from char, and the char* needs to be freed afterwards, which it was not and therefore it was leaking.
Also, Is there a reason for using curl_unescape() instead of curl_easy_unescape()?