mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-13 04:46:38 +01:00
fixed some memory leak
This commit is contained in:
parent
442c63d7a4
commit
f2c401b6c0
1 changed files with 9 additions and 8 deletions
1
util.cpp
1
util.cpp
|
@ -283,6 +283,7 @@ namespace net
|
|||
inet_ntop(af, &((sockaddr_in6 *)cur->ifa_addr)->sin6_addr, addr, INET6_ADDRSTRLEN);
|
||||
freeifaddrs(addrs);
|
||||
std::string cur_ifaddr(addr);
|
||||
delete[] addr;
|
||||
return boost::asio::ip::address::from_string(cur_ifaddr);
|
||||
}
|
||||
cur = cur->ifa_next;
|
||||
|
|
Loading…
Add table
Reference in a new issue