Commit 1e56407b authored by Ronan's avatar Ronan

fix(coreapi): avoid leaks

parent 5264b67f
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment