Skip to content

Commit d769199

Browse files
committed
Memory leaks can occur when using the http-ts protocol
1 parent 5eb8f96 commit d769199

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

modules/nginx-rtmp-module/ngx_rtmp_init.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,11 @@ ngx_rtmp_close_session(ngx_rtmp_session_t *s)
301301

302302
ngx_rtmp_free_merge_frame(s);
303303

304-
if (s->live_type == NGX_HLS_LIVE || s->live_type == NGX_MPEGTS_LIVE) {
305-
// while (s->out_pos != s->out_last) {
306-
// ngx_rtmp_shared_free_mpegts_frame(s->mpegts_out[s->out_pos++]);
307-
// s->out_pos %= s->out_queue;
308-
// }
304+
if (s->live_type == NGX_MPEGTS_LIVE) {
305+
while (s->out_pos != s->out_last) {
306+
ngx_rtmp_shared_free_mpegts_frame(s->mpegts_out[s->out_pos++]);
307+
s->out_pos %= s->out_queue;
308+
}
309309
} else {
310310
while (s->out_pos != s->out_last) {
311311
ngx_rtmp_shared_free_frame(s->out[s->out_pos++]);

release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ then
181181

182182
elif [ "$CMD" == "brew" ]
183183
then
184-
brew install -y openssl pcre
184+
brew install openssl pcre
185185
options[${#options[*]}]='--with-ld-opt="-L/usr/local/opt/openssl/lib/ -L/usr/local/opt/pcre/lib/"'
186186
options[${#options[*]}]='--with-cc-opt="-I/usr/local/opt/openssl/include/ -I/usr/local/opt/pcre/include/"'
187187

0 commit comments

Comments
 (0)