From 8388d4b48edc03295b73e13d55364a72425a47b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Tue, 29 Mar 2016 15:30:35 +0200 Subject: [PATCH] Fixes a memory leak while displaying a message --- coreapi/linphonecore.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index c4a15790e..c99b4b78c 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -4173,6 +4173,7 @@ int linphone_core_preempt_sound_resources(LinphoneCore *lc){ int linphone_core_resume_call(LinphoneCore *lc, LinphoneCall *call){ char temp[255]={0}; const char *subject="Call resuming"; + char *tmp; if(call->state!=LinphoneCallPaused ){ ms_warning("we cannot resume a call that has not been established and paused before"); @@ -4213,7 +4214,8 @@ int linphone_core_resume_call(LinphoneCore *lc, LinphoneCall *call){ linphone_call_set_state(call,LinphoneCallResuming,"Resuming"); if (call->params->in_conference==FALSE) lc->current_call=call; - snprintf(temp,sizeof(temp)-1,"Resuming the call with %s",linphone_call_get_remote_address_as_string(call)); + snprintf(temp,sizeof(temp)-1,"Resuming the call with %s",(tmp = linphone_call_get_remote_address_as_string(call))); + ms_free(tmp); linphone_core_notify_display_status(lc,temp); if (lc->sip_conf.sdp_200_ack){