Remove unnecessary string duplication (http_init creates an internal copy of the proxy string)
This commit is contained in:
parent
aae7113c81
commit
35b7f62d3b
@ -121,12 +121,7 @@ void Client::Initialise(std::string proxyString)
|
||||
}
|
||||
|
||||
if(proxyString.length())
|
||||
{
|
||||
char *proxy = new char[proxyString.length() + 1];
|
||||
std::strcpy (proxy, proxyString.c_str());
|
||||
http_init(proxy);
|
||||
delete[] proxy;
|
||||
}
|
||||
http_init(proxyString.c_str());
|
||||
else
|
||||
http_init(NULL);
|
||||
|
||||
|
Reference in New Issue
Block a user