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 /*