From d00dbf4c8d4227c831c3c865ed4caa2d43f3756f Mon Sep 17 00:00:00 2001 From: Jack Lau Date: Mon, 6 Oct 2025 17:40:27 +0800 Subject: [PATCH] srs_app_rtc_conn: fix illegal memory access Regression since 20f6cd595cc8be63a824d29d1332abd4488685be The early code might meet bridge is empty when there is no bridge(e.x. rtc to rtc). Then srs_freep will free the brige. Remove this code that seems redundant. Signed-off-by: Jack Lau --- trunk/src/app/srs_app_rtc_conn.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/trunk/src/app/srs_app_rtc_conn.cpp b/trunk/src/app/srs_app_rtc_conn.cpp index 7da3d0964..aa79b3f4d 100644 --- a/trunk/src/app/srs_app_rtc_conn.cpp +++ b/trunk/src/app/srs_app_rtc_conn.cpp @@ -1310,11 +1310,6 @@ srs_error_t SrsRtcPublishStream::initialize(ISrsRequest *r, SrsRtcSourceDescript return srs_error_wrap(err, "create bridge"); } - if ((err = bridge->initialize(r)) != srs_success) { - srs_freep(bridge); - return srs_error_wrap(err, "create bridge"); - } - source_->set_bridge(bridge); return err;