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:
itytophile
2022-12-23 02:13:51 +01:00
committed by GitHub
parent a5d4911a16
commit 679ce519dd
5 changed files with 24 additions and 35 deletions

View File

@ -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;