From f6768244cd08e39b80c15d4781a7d45da7462f93 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 12 Feb 2010 12:01:48 +0100 Subject: [PATCH] fix memory leaks in linphonec, due to api change with linphone_core_add_auth_info(). --- console/commands.c | 1 + console/linphonec.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/console/commands.c b/console/commands.c index cb684511c..d32e62667 100644 --- a/console/commands.c +++ b/console/commands.c @@ -1384,6 +1384,7 @@ static int lpc_cmd_register(LinphoneCore *lc, char *args){ snprintf(realm,sizeof(realm)-1,"\"%s\"",from->url->host); info=linphone_auth_info_new(from->url->username,NULL,passwd,NULL,NULL); linphone_core_add_auth_info(lc,info); + linphone_auth_info_destroy(info); } osip_from_free(from); } diff --git a/console/linphonec.c b/console/linphonec.c index 81fccea14..2e0ca8342 100644 --- a/console/linphonec.c +++ b/console/linphonec.c @@ -827,6 +827,8 @@ linphonec_prompt_for_auth_final(LinphoneCore *lc) */ linphone_auth_info_set_passwd(pending_auth, input); linphone_core_add_auth_info(lc, pending_auth); + linphone_auth_info_destroy(pending_auth); + auth_stack.elem[auth_stack.nitems-1]=0; --(auth_stack.nitems); #ifdef HAVE_READLINE /*