Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions trunk/src/main/srs_main_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,12 @@ 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) {
return srs_error_wrap(err, "run");
}

err = run_directly_or_daemon();
srs_free_global_system_ips();
if (err != srs_success) {
return srs_error_wrap(err, "run");
}

return err;
}
Expand Down