fix err memory leak in rtc to rtmp bridge. v6.0.174 (#4441)

1. print the error messages before dismiss it;
2. free the err to avoid memory leak;

found this issue when research #4434 .

 1. develop
 2. 5.0release
 3. 6.0release

---------

Co-authored-by: winlin <winlinvip@gmail.com>
This commit is contained in:
Jacob Su 2025-08-16 21:56:49 +08:00 committed by winlin
parent ebc9821ac9
commit 2ab3937a68
3 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,7 @@ The changelog for SRS.
<a name="v6-changes"></a>
## SRS 6.0 Changelog
* v6.0, 2025-08-16, Merge [#4441](https://github.com/ossrs/srs/pull/4441): fix err memory leak in rtc to rtmp bridge. v6.0.174 (#4441)
* v6.0, 2025-08-14, Merge [#4161](https://github.com/ossrs/srs/pull/4161): fix hls & dash segments cleanup. v6.0.173 (#4161)
* v6.0, 2025-08-12, Merge [#4230](https://github.com/ossrs/srs/pull/4230): MP4 DVR: Fix audio/video synchronization issues in WebRTC recordings. v6.0.172 (#4230)
* v6.0, 2025-08-11, Merge [#4432](https://github.com/ossrs/srs/pull/4432): AI: HTTP-FLV: Fix heap-use-after-free crash during stream unmount. v6.0.171 (#4432)

View File

@ -1881,7 +1881,8 @@ srs_error_t SrsRtcFrameBuilder::packet_video_rtmp(const uint16_t start, const ui
}
if ((err = bridge_->on_frame(&msg)) != srs_success) {
srs_warn("fail to pack video frame");
srs_warn("fail to pack video frame: %s", srs_error_summary(err).c_str());
srs_freep(err);
}
header_sn_ = end + 1;

View File

@ -9,6 +9,6 @@
#define VERSION_MAJOR 6
#define VERSION_MINOR 0
#define VERSION_REVISION 173
#define VERSION_REVISION 174
#endif