diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index a067693e1..3d510115d 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -7,6 +7,7 @@ The changelog for SRS. ## SRS 6.0 Changelog +* v6.0, 2025-10-17, Merge [#4534](https://github.com/ossrs/srs/pull/4534): HLS: Fix a iterator bug in hls_ctx cleanup function. v6.0.182 (#4534) * v6.0, 2025-10-14, Disable sanitizer by default to fix memory leak. (#4364) v6.0.181 * v6.0, 2025-10-01, SRT: Support configurable default_streamid option. v6.0.180 * v6.0, 2025-09-27, For Edge, only support RTMP or HTTP-FLV. v6.0.179 (#4512) diff --git a/trunk/src/app/srs_app_http_static.cpp b/trunk/src/app/srs_app_http_static.cpp index bfa407471..36911d0b7 100644 --- a/trunk/src/app/srs_app_http_static.cpp +++ b/trunk/src/app/srs_app_http_static.cpp @@ -355,7 +355,7 @@ srs_error_t SrsHlsStream::on_timer(srs_utime_t interval) srs_error_t err = srs_success; std::map::iterator it; - for (it = map_ctx_info_.begin(); it != map_ctx_info_.end(); ++it) { + for (it = map_ctx_info_.begin(); it != map_ctx_info_.end();) { string ctx = it->first; SrsHlsVirtualConn* info = it->second; @@ -370,10 +370,10 @@ srs_error_t SrsHlsStream::on_timer(srs_utime_t interval) // TODO: FIXME: Should finger out the err. stat->on_disconnect(ctx, srs_success); - map_ctx_info_.erase(it); srs_freep(info); - - break; + map_ctx_info_.erase(it++); + } else { + ++it; } } diff --git a/trunk/src/core/srs_core_version6.hpp b/trunk/src/core/srs_core_version6.hpp index da7917013..1f34e7481 100644 --- a/trunk/src/core/srs_core_version6.hpp +++ b/trunk/src/core/srs_core_version6.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 6 #define VERSION_MINOR 0 -#define VERSION_REVISION 181 +#define VERSION_REVISION 182 #endif