diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 0f28a0f13..3523c51b6 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,6 +8,7 @@ The changelog for SRS. ## SRS 5.0 Changelog +* v5.0, 2022-11-21, Merge [#3264](https://github.com/ossrs/srs/pull/3264): Asan: Try to fix st_memory_leak for asan check. (#3264). v5.0.91 * v5.0, 2022-11-21, Asan: Fix global ip address leak check. v5.0.90 * v5.0, 2022-11-20, For [#2532](https://github.com/ossrs/srs/issues/2532): Windows: Support cygwin pipline and packager. v5.0.89 * v5.0, 2022-11-18, Fix [#3215](https://github.com/ossrs/srs/issues/3215): Callback: Fix bug for response string 0. v5.0.88 diff --git a/trunk/src/app/srs_app_hybrid.cpp b/trunk/src/app/srs_app_hybrid.cpp index d3bf71e31..929baf901 100644 --- a/trunk/src/app/srs_app_hybrid.cpp +++ b/trunk/src/app/srs_app_hybrid.cpp @@ -235,6 +235,8 @@ void SrsHybridServer::stop() ISrsHybridServer* server = *it; server->stop(); } + + srs_st_destroy(); } SrsServerAdapter* SrsHybridServer::srs() diff --git a/trunk/src/core/srs_core_version5.hpp b/trunk/src/core/srs_core_version5.hpp index 8046fffd3..aaa88046c 100644 --- a/trunk/src/core/srs_core_version5.hpp +++ b/trunk/src/core/srs_core_version5.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 0 -#define VERSION_REVISION 90 +#define VERSION_REVISION 91 #endif diff --git a/trunk/src/protocol/srs_protocol_st.cpp b/trunk/src/protocol/srs_protocol_st.cpp index 36fcb13dd..a1f9ec9ac 100644 --- a/trunk/src/protocol/srs_protocol_st.cpp +++ b/trunk/src/protocol/srs_protocol_st.cpp @@ -76,6 +76,11 @@ srs_error_t srs_st_init() return srs_success; } +void srs_st_destroy(void) +{ + st_destroy(); +} + void srs_close_stfd(srs_netfd_t& stfd) { if (stfd) { diff --git a/trunk/src/protocol/srs_protocol_st.hpp b/trunk/src/protocol/srs_protocol_st.hpp index cd4c8f215..8295c8b75 100644 --- a/trunk/src/protocol/srs_protocol_st.hpp +++ b/trunk/src/protocol/srs_protocol_st.hpp @@ -20,8 +20,10 @@ typedef void* srs_thread_t; typedef void* srs_cond_t; typedef void* srs_mutex_t; -// Initialize st, requires epoll. +// Initialize ST, requires epoll for linux. extern srs_error_t srs_st_init(); +// Destroy ST, free resources for asan detecting. +extern void srs_st_destroy(void); // Close the netfd, and close the underlayer fd. // @remark when close, user must ensure io completed.