diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/krb5/krb/get_in_tkt.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c index e97984f50..63402ca03 100644 --- a/src/lib/krb5/krb/get_in_tkt.c +++ b/src/lib/krb5/krb/get_in_tkt.c @@ -965,14 +965,15 @@ krb5_init_creds_init(krb5_context context, krb5_princ_type(context, ctx->request->client) = KRB5_NT_WELLKNOWN; } code = restart_init_creds_loop(context, ctx, NULL); + if (code) + goto cleanup; *pctx = ctx; + ctx = NULL; cleanup: - if (code != 0) - krb5_init_creds_free(context, ctx); - if (str != NULL) - free(str); + krb5_init_creds_free(context, ctx); + free(str); return code; } |
