From 1f3b1395513a4c1578597e36673ee6eaf6149650 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Thu, 12 Jan 2017 17:48:18 +0100 Subject: [PATCH] Fix crash during call invite if no SIP transport is available. --- coreapi/linphonecore.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index c0ffc626f..aff09159d 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -2905,7 +2905,8 @@ int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call, const Linph barmsg=ortp_strdup_printf("%s %s", _("Contacting"), real_url); linphone_core_notify_display_status(lc,barmsg); ms_free(barmsg); - + + linphone_call_ref(call); /* Take a ref because sal_call() may destroy the call if no SIP transport is available */ err=sal_call(call->op,from,real_url); if (err < 0){ @@ -2928,6 +2929,7 @@ int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call, const Linph linphone_call_set_state(call,LinphoneCallOutgoingProgress,"Outgoing call in progress"); end: + linphone_call_unref(call); /* Revert the ref taken before calling sal_call() */ ms_free(real_url); ms_free(from); return err;