From c82307a7472935ea97577929585f256c466757d8 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 6 Jan 2016 16:32:54 +0100 Subject: [PATCH] fix rtpsession leak (for RTT streams) --- coreapi/linphonecall.c | 8 +++++--- oRTP | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 184eccb1c..087d8fe27 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1369,10 +1369,12 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro * (_linphone_call_destroy) if the call was never notified to the application. */ void linphone_call_free_media_resources(LinphoneCall *call){ + int i; + linphone_call_stop_media_streams(call); - ms_media_stream_sessions_uninit(&call->sessions[call->main_audio_stream_index]); - ms_media_stream_sessions_uninit(&call->sessions[call->main_video_stream_index]); - if (call->params->realtimetext_enabled) ms_media_stream_sessions_uninit(&call->sessions[call->main_text_stream_index]); + for (i = 0; i < SAL_MEDIA_DESCRIPTION_MAX_STREAMS; ++i){ + ms_media_stream_sessions_uninit(&call->sessions[i]); + } linphone_call_delete_upnp_session(call); linphone_call_delete_ice_session(call); linphone_call_stats_uninit(&call->stats[LINPHONE_CALL_STATS_AUDIO]); diff --git a/oRTP b/oRTP index 0255008c1..5208b686f 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 0255008c1392f800530ff416f39e70d39912e0f9 +Subproject commit 5208b686f0d1abf55d8dcfe84f749ec4878e451c