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

asan: Fix memory leak in asan by releasing global IPs when run_directly_or_daemon fails. v5.0.154, v6.0.44 (#3541)

* asan: when run_directly_or_daemon failed, release gloabal ips

* asan: refine global system ips release code

* Update release to v5.0.154, v6.0.44

---------

Co-authored-by: chundonglinlin <chundonglinlin@163.com>
This commit is contained in:
ChenGH 2023-05-14 12:04:58 +08:00 committed by GitHub
parent 78f1ebfcb1
commit 0629beeb0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 6 deletions

View file

@ -241,13 +241,13 @@ srs_error_t do_main(int argc, char** argv, char** envp)
#ifdef SRS_SANITIZER_LOG
__asan_set_error_report_callback(asan_report_callback);
#endif
if ((err = run_directly_or_daemon()) != srs_success) {
err = run_directly_or_daemon();
srs_free_global_system_ips();
if (err != srs_success) {
return srs_error_wrap(err, "run");
}
srs_free_global_system_ips();
return err;
}