if (!NT_STATUS_IS_OK(status)) {
DBG_WARNING("samba_kdc_get_user_info_from_db failed: %s\n",
nt_errstr(status));
- talloc_free(tmp_ctx);
- return EINVAL;
+ code = EINVAL;
+ goto out;
}
status = auth_generate_session_info(tmp_ctx,
if (!NT_STATUS_IS_OK(status)) {
DBG_WARNING("auth_generate_session_info failed: %s\n",
nt_errstr(status));
- talloc_free(tmp_ctx);
- return EINVAL;
+ code = EINVAL;
+ goto out;
}
/* password is expected as UTF16 */
pwd, strlen(pwd),
&password.data, &password.length)) {
DBG_WARNING("convert_string_talloc failed\n");
- talloc_free(tmp_ctx);
- return EINVAL;
+ code = EINVAL;
+ goto out;
}
status = samdb_kpasswd_change_password(tmp_ctx,