(process_last_request): Process the lr.func even if we have no prompter.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24643 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -231,8 +231,9 @@ process_last_request(krb5_context context,
|
||||
time_t t;
|
||||
size_t i;
|
||||
|
||||
if (ctx->prompter == NULL)
|
||||
return 0;
|
||||
/*
|
||||
* First check if there is a API consumer.
|
||||
*/
|
||||
|
||||
realm = krb5_principal_get_realm (context, ctx->cred.client);
|
||||
lr = &ctx->enc_part.last_req;
|
||||
@@ -241,7 +242,7 @@ process_last_request(krb5_context context,
|
||||
krb5_last_req_entry **lre;
|
||||
|
||||
lre = calloc(lr->len + 1, sizeof(**lre));
|
||||
if (lre) {
|
||||
if (lre == NULL) {
|
||||
krb5_set_error_message(context, ENOMEM,
|
||||
N_("malloc: out of memory", ""));
|
||||
return ENOMEM;
|
||||
@@ -262,6 +263,13 @@ process_last_request(krb5_context context,
|
||||
free(lre);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now check if we should prompt the user
|
||||
*/
|
||||
|
||||
if (ctx->prompter == NULL)
|
||||
return 0;
|
||||
|
||||
krb5_timeofday (context, &sec);
|
||||
|
||||
t = sec + get_config_time (context,
|
||||
|
Reference in New Issue
Block a user