提交 924e24a0 authored 作者: William King's avatar William King

FS-5395: --resolve Resolve another mod_rtmp crash where oh specific hangup…

FS-5395: --resolve Resolve another mod_rtmp crash where oh specific hangup scenarios there would be a free of variable that wasn't ever malloced
上级 2e19cbcc
......@@ -767,6 +767,7 @@ switch_status_t rtmp_session_request(rtmp_profile_t *profile, rtmp_session_t **n
(*newsession)->in_chunksize = (*newsession)->out_chunksize = RTMP_DEFAULT_CHUNKSIZE;
(*newsession)->recv_ack_window = RTMP_DEFAULT_ACK_WINDOW;
(*newsession)->next_streamid = 1;
(*newsession)->io_private = NULL;
switch_uuid_get(&uuid);
switch_uuid_format((*newsession)->uuid, &uuid);
......
......@@ -183,8 +183,10 @@ static switch_status_t rtmp_tcp_close(rtmp_session_t *rsession)
switch_buffer_destroy(&(io_pvt->sendq));
}
free(rsession->io_private);
rsession->io_private = NULL;
if ( rsession->io_private ) {
free(rsession->io_private);
rsession->io_private = NULL;
}
return SWITCH_STATUS_SUCCESS;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论