1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

ASAN: Disable memory leak detection by default. v7.0.8 (#4154)

By setting the env `ASAN_OPTIONS=halt_on_error=0`, we can ignore memory
leaks, see
https://github.com/google/sanitizers/wiki/AddressSanitizerFlags

By setting env `ASAN_OPTIONS=detect_leaks=0`, we can disable memory
leaking detection in parent process when forking for daemon.
This commit is contained in:
Winlin 2024-08-22 18:43:45 +08:00 committed by GitHub
parent 8f48a0e2d1
commit d4248503e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 19 additions and 28 deletions

View file

@ -673,17 +673,6 @@ bool srs_net_device_is_internet(const sockaddr* addr)
}
vector<SrsIPAddress*> _srs_system_ips;
void srs_free_global_system_ips()
{
vector<SrsIPAddress*>& ips = _srs_system_ips;
// Release previous IPs.
for (int i = 0; i < (int)ips.size(); i++) {
SrsIPAddress* ip = ips[i];
srs_freep(ip);
}
ips.clear();
}
void discover_network_iface(ifaddrs* cur, vector<SrsIPAddress*>& ips, stringstream& ss0, stringstream& ss1, bool ipv6, bool loopback)
{
@ -721,9 +710,6 @@ void discover_network_iface(ifaddrs* cur, vector<SrsIPAddress*>& ips, stringstre
void retrieve_local_ips()
{
// Release previous IPs.
srs_free_global_system_ips();
vector<SrsIPAddress*>& ips = _srs_system_ips;
// Get the addresses.