Memory leaks fixes

parent 4d43eeed
......@@ -182,14 +182,7 @@ const char * media_stream_type_str(MediaStream *stream) {
void ms_media_stream_sessions_uninit(MSMediaStreamSessions *sessions){
if (sessions->srtp_session) {
RtpTransport *rtptr=NULL,*rtcptr=NULL;
ortp_srtp_dealloc(sessions->srtp_session);
if (sessions->rtp_session){
rtp_session_get_transports(sessions->rtp_session,&rtptr,&rtcptr);
rtp_session_set_transports(sessions->rtp_session,NULL,NULL);
if (rtptr) srtp_transport_destroy(rtptr);
if (rtcptr) srtp_transport_destroy(rtcptr);
}
sessions->srtp_session=NULL;
}
if (sessions->rtp_session) {
......
......@@ -61,6 +61,9 @@ bool_t ms_qos_analyzer_has_improved(MSQosAnalyzer *obj){
void ms_qos_analyzer_set_on_action_suggested(MSQosAnalyzer *obj,
void (*on_action_suggested)(void*, int, const char**), void* u){
if (obj->on_action_suggested_user_pointer!=NULL){
ms_free(obj->on_action_suggested_user_pointer);
}
obj->on_action_suggested=on_action_suggested;
obj->on_action_suggested_user_pointer=u;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment