diff options
author | Sumit Bose <sbose@redhat.com> | 2013-02-19 12:49:25 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-02-28 12:27:07 +0100 |
commit | db1a07b7f275b181f87496687593d3d2b7d013e8 (patch) | |
tree | 6f5e84c2ea07444154d1f7af19968aa6176fb0a3 | |
parent | 5582c9ca63bd33f1975f69b622e65c6fa6e9d77c (diff) | |
download | freeipa-db1a07b7f275b181f87496687593d3d2b7d013e8.tar.gz freeipa-db1a07b7f275b181f87496687593d3d2b7d013e8.tar.xz freeipa-db1a07b7f275b181f87496687593d3d2b7d013e8.zip |
ipa-kdb: Uninitialized scalar variable in ipadb_reinit_mspac()
There was a code path where ret was used instead of kerr to save a
return value.
Fixes https://fedorahosted.org/freeipa/ticket/3422
-rw-r--r-- | daemons/ipa-kdb/ipa_kdb_mspac.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/daemons/ipa-kdb/ipa_kdb_mspac.c b/daemons/ipa-kdb/ipa_kdb_mspac.c index 950000349..aeadc6d75 100644 --- a/daemons/ipa-kdb/ipa_kdb_mspac.c +++ b/daemons/ipa-kdb/ipa_kdb_mspac.c @@ -1938,12 +1938,11 @@ krb5_error_code ipadb_reinit_mspac(struct ipadb_context *ipactx) if (ipactx->mspac && ipactx->mspac->num_trusts == 0) { /* Check if there is any trust configured. If not, just return * and do not re-initialize the MS-PAC structure. */ - ret = ipadb_mspac_check_trusted_domains(ipactx); - if (ret == KRB5_KDB_NOENTRY) { - ret = 0; + kerr = ipadb_mspac_check_trusted_domains(ipactx); + if (kerr == KRB5_KDB_NOENTRY) { + kerr = 0; goto done; - } else if (ret != 0) { - ret = EIO; + } else if (kerr != 0) { goto done; } } |