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:
parent
78f1ebfcb1
commit
0629beeb0a
4 changed files with 8 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue