mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 20:50:41 +00:00
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
This commit is contained in:
parent
2e19cbcc61
commit
924e24a0de
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user