only set password if we have one, dont free krb-error since it removed

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24215 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-12-18 05:00:56 +00:00
parent 38e75f99c1
commit 0bbf9d3e6f

View File

@@ -284,16 +284,15 @@ get_init_creds_common(krb5_context context,
krb5_get_init_creds_opt_alloc (context, &default_opt);
options = default_opt;
krb5_get_init_creds_opt_set_default_flags(context, NULL, realm, options);
} else {
_krb5_get_init_creds_opt_free_krb5_error(options);
}
if (options->opt_private) {
ret = krb5_init_creds_set_password(context, ctx,
options->opt_private->password);
if (ret)
goto out;
if (options->opt_private->password) {
ret = krb5_init_creds_set_password(context, ctx,
options->opt_private->password);
if (ret)
goto out;
}
ctx->keyproc = options->opt_private->key_proc;
ctx->req_pac = options->opt_private->req_pac;