mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 20:18:09 +00:00
fix(coreapi): avoid leaks
This commit is contained in:
parent
5264b67ff2
commit
1e56407b0b
2 changed files with 8 additions and 4 deletions
|
|
@ -1129,9 +1129,9 @@ LinphoneAccountCreatorStatus linphone_account_creator_update_password_linphone(L
|
|||
return LinphoneAccountCreatorStatusMissingArguments;
|
||||
}
|
||||
|
||||
const char * username = creator->username ? creator->username : creator->phone_number;
|
||||
const char * ha1 = ms_strdup(creator->ha1 ? creator->ha1 : ha1_for_passwd(username, linphone_proxy_config_get_domain(creator->proxy_cfg), creator->password) );
|
||||
const char * new_ha1 = ms_strdup(ha1_for_passwd(username, linphone_proxy_config_get_domain(creator->proxy_cfg), new_pwd));
|
||||
const char *username = creator->username ? creator->username : creator->phone_number;
|
||||
char *ha1 = bctbx_strdup(creator->ha1 ? creator->ha1 : ha1_for_passwd(username, linphone_proxy_config_get_domain(creator->proxy_cfg), creator->password) );
|
||||
char *new_ha1 = bctbx_strdup(ha1_for_passwd(username, linphone_proxy_config_get_domain(creator->proxy_cfg), new_pwd));
|
||||
|
||||
ms_debug("Account creator: update_password (username=%s, domain=%s)",
|
||||
creator->username,
|
||||
|
|
@ -1147,6 +1147,9 @@ LinphoneAccountCreatorStatus linphone_account_creator_update_password_linphone(L
|
|||
linphone_xml_rpc_session_send_request(creator->xmlrpc_session, request);
|
||||
linphone_xml_rpc_request_unref(request);
|
||||
|
||||
bctbx_free(ha1);
|
||||
bctbx_free(new_ha1);
|
||||
|
||||
return LinphoneAccountCreatorStatusRequestOk;
|
||||
}
|
||||
/****************** END OF UPDATE ACCOUNT **************************/
|
||||
|
|
|
|||
|
|
@ -69,7 +69,8 @@ const LinphoneDialPlan *linphone_dial_plan_by_ccc (const char *ccc) {
|
|||
|
||||
const bctbx_list_t *linphone_dial_plan_get_all_list () {
|
||||
static const list<LinphonePrivate::DialPlan> &dps = LinphonePrivate::DialPlan::getAllDialPlans();
|
||||
return L_GET_RESOLVED_C_LIST_FROM_CPP_LIST(dps);
|
||||
static const bctbx_list_t *list = L_GET_RESOLVED_C_LIST_FROM_CPP_LIST(dps);
|
||||
return list;
|
||||
}
|
||||
|
||||
bool_t linphone_dial_plan_is_generic (const LinphoneDialPlan *ccc) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue