mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 20:48:07 +00:00
Fix some memory leaks.
This commit is contained in:
parent
e35b483fa1
commit
ea5cc190fa
2 changed files with 16 additions and 9 deletions
|
|
@ -2187,9 +2187,9 @@ void MediaSessionPrivate::handleIceEvents (OrtpEvent *ev) {
|
|||
if (iceAgent->hasCompletedCheckList()) {
|
||||
/* At least one ICE session has succeeded, so perform a call update */
|
||||
if (iceAgent->isControlling() && q->getCurrentParams()->getPrivate()->getUpdateCallWhenIceCompleted()) {
|
||||
MediaSessionParams *newParams = new MediaSessionParams(*getParams());
|
||||
newParams->getPrivate()->setInternalCallUpdate(true);
|
||||
q->update(newParams);
|
||||
MediaSessionParams newParams(*getParams());
|
||||
newParams.getPrivate()->setInternalCallUpdate(true);
|
||||
q->update(&newParams);
|
||||
}
|
||||
startDtlsOnAllStreams();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -775,10 +775,12 @@ bool_t check_ice(LinphoneCoreManager* caller, LinphoneCoreManager* callee, Linph
|
|||
realtime_text_enabled=linphone_call_params_realtime_text_enabled(linphone_call_get_current_params(c1));
|
||||
if (audio_enabled) {
|
||||
liblinphone_tester_clock_start(&ts);
|
||||
do{
|
||||
LinphoneCallStats *stats1 = NULL;
|
||||
LinphoneCallStats *stats2 = NULL;
|
||||
do {
|
||||
if ((c1 != NULL) && (c2 != NULL)) {
|
||||
LinphoneCallStats *stats1 = linphone_call_get_audio_stats(c1);
|
||||
LinphoneCallStats *stats2 = linphone_call_get_audio_stats(c2);
|
||||
stats1 = linphone_call_get_audio_stats(c1);
|
||||
stats2 = linphone_call_get_audio_stats(c2);
|
||||
if (linphone_call_stats_get_ice_state(stats1)==state &&
|
||||
linphone_call_stats_get_ice_state(stats2)==state){
|
||||
audio_success=TRUE;
|
||||
|
|
@ -786,13 +788,18 @@ bool_t check_ice(LinphoneCoreManager* caller, LinphoneCoreManager* callee, Linph
|
|||
check_ice_from_rtp(c2,c1,LinphoneStreamTypeAudio);
|
||||
break;
|
||||
}
|
||||
linphone_call_stats_unref(stats1);
|
||||
linphone_call_stats_unref(stats2);
|
||||
linphone_core_iterate(caller->lc);
|
||||
linphone_core_iterate(callee->lc);
|
||||
linphone_call_stats_unref(stats1);
|
||||
linphone_call_stats_unref(stats2);
|
||||
stats1 = stats2 = NULL;
|
||||
}
|
||||
ms_usleep(20000);
|
||||
}while(!liblinphone_tester_clock_elapsed(&ts,10000));
|
||||
} while (!liblinphone_tester_clock_elapsed(&ts,10000));
|
||||
if (stats1)
|
||||
linphone_call_stats_unref(stats1);
|
||||
if (stats2)
|
||||
linphone_call_stats_unref(stats2);
|
||||
}
|
||||
|
||||
if (video_enabled){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue