Fix DNSLookup memory leak (#422)
* Fix memory leak with shared_ptr and -fsanitize=address * Replace addrinfo* by shared_ptr * fsanitize=address only on Linux * Add USE_WS Linux CI test * Remove fsanitize from the cmake files * Remove USE_WS in linux test suite
This commit is contained in:
@@ -892,9 +892,8 @@ namespace ix
|
||||
auto dnsLookup = std::make_shared<DNSLookup>(hostname, 80);
|
||||
|
||||
std::string errMsg;
|
||||
struct addrinfo* res;
|
||||
|
||||
res = dnsLookup->resolve(errMsg, [] { return false; });
|
||||
auto res = dnsLookup->resolve(errMsg, [] { return false; });
|
||||
|
||||
auto addr = res->ai_addr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user