diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 88e7d01a9..fa58bb465 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -582,6 +582,7 @@ void linphone_call_set_state(LinphoneCall *call, LinphoneCallState cstate, const static void linphone_call_destroy(LinphoneCall *obj) { + linphone_call_delete_ice_session(obj); if (obj->op!=NULL) { sal_op_release(obj->op); obj->op=NULL; @@ -605,9 +606,6 @@ static void linphone_call_destroy(LinphoneCall *obj) if (obj->auth_token) { ms_free(obj->auth_token); } - if (obj->ice_session) { - ice_session_destroy(obj->ice_session); - } ms_free(obj); }