summaryrefslogtreecommitdiffstats
path: root/src/providers/krb5/krb5_child.c
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-10-14 10:32:34 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-10-17 13:58:02 +0200
commit6dc5ddd177e3b0ffe4315827aa8df7f33340585c (patch)
tree8b64f16755bf7bf9a56a0f305a7bf69421930d57 /src/providers/krb5/krb5_child.c
parentcb446b6149d28c204954ae75143b89aef14115dc (diff)
downloadsssd-6dc5ddd177e3b0ffe4315827aa8df7f33340585c.tar.gz
sssd-6dc5ddd177e3b0ffe4315827aa8df7f33340585c.tar.xz
sssd-6dc5ddd177e3b0ffe4315827aa8df7f33340585c.zip
krb5: Remove warning dereference of a null pointer
Variable kr->creds is initialized in function krb5_get_init_creds_password. It does not make sense to check kr->creds for null, because we have already checked return value of function krb5_get_init_creds_password. Resolves: https://fedorahosted.org/sssd/ticket/2112
Diffstat (limited to 'src/providers/krb5/krb5_child.c')
-rw-r--r--src/providers/krb5/krb5_child.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c
index 42cfbbfe7..f96bc8aae 100644
--- a/src/providers/krb5/krb5_child.c
+++ b/src/providers/krb5/krb5_child.c
@@ -896,7 +896,6 @@ static krb5_error_code get_and_save_tgt(struct krb5_req *kr,
int realm_length;
krb5_error_code kerr;
char *cc_name;
- krb5_principal principal;
kerr = sss_krb5_get_init_creds_opt_set_expire_callback(kr->ctx, kr->options,
sss_krb5_expire_callback_func,
@@ -941,13 +940,12 @@ static krb5_error_code get_and_save_tgt(struct krb5_req *kr,
}
}
- principal = kr->creds ? kr->creds->client : kr->princ;
-
/* If kr->ccname is cache collection (DIR:/...), we want to work
* directly with file ccache (DIR::/...), but cache collection
* should be returned back to back end.
*/
- cc_name = sss_get_ccache_name_for_principal(kr->pd, kr->ctx, principal,
+ cc_name = sss_get_ccache_name_for_principal(kr->pd, kr->ctx,
+ kr->creds->client,
kr->ccname);
if (cc_name == NULL) {
cc_name = kr->ccname;