mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Merge pull request #7962 from spycrab/httprequest_ec_memleak
Common/HttpRequest: Fix EscapeComponent leaking memory
This commit is contained in:
commit
b47f09c26d
@ -167,7 +167,11 @@ void HttpRequest::Impl::FollowRedirects(long max)
|
||||
|
||||
std::string HttpRequest::Impl::EscapeComponent(const std::string& string)
|
||||
{
|
||||
return curl_easy_escape(m_curl.get(), string.c_str(), static_cast<int>(string.size()));
|
||||
char* escaped = curl_easy_escape(m_curl.get(), string.c_str(), static_cast<int>(string.size()));
|
||||
std::string escaped_str(escaped);
|
||||
curl_free(escaped);
|
||||
|
||||
return escaped_str;
|
||||
}
|
||||
|
||||
static size_t CurlWriteCallback(char* data, size_t size, size_t nmemb, void* userdata)
|
||||
|
Loading…
Reference in New Issue
Block a user