summaryrefslogtreecommitdiffstats
path: root/src
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 14:00:50 +0200
commit7ffb1a2044e4de13fa2cb4520c680d907f42770a (patch)
tree1b2c3f42195d62bb902c7fa9d90754315f7c83a6 /src
parent348faaa11b8301e53fb946397e376ca2562af022 (diff)
downloadsssd-7ffb1a2044e4de13fa2cb4520c680d907f42770a.tar.gz
sssd-7ffb1a2044e4de13fa2cb4520c680d907f42770a.tar.xz
sssd-7ffb1a2044e4de13fa2cb4520c680d907f42770a.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')
-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 20fb76318..90ebcff45 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;