summaryrefslogtreecommitdiff
path: root/src/providers/ipa
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-06-27 09:59:57 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-07-06 11:44:45 -0400
commit69905bf968003216d444fc68d8597e139362f2e6 (patch)
treeb9e8f4da8167d7b9936218ffb697cba7ab008609 /src/providers/ipa
parent71062d4494bbe9c24358e21fa3a40ae747eae0f6 (diff)
downloadsssd-69905bf968003216d444fc68d8597e139362f2e6.tar.gz
sssd-69905bf968003216d444fc68d8597e139362f2e6.tar.bz2
sssd-69905bf968003216d444fc68d8597e139362f2e6.zip
KRB5: Drop memctx parameter of krb5_try_kdcip
This function is not supposed to return any newly-allocated memory directly. It was actually leaking the memory for krb5_servers if krb5_kdcip was being used, though it was undetectable because it was allocated on the provided memctx. This patch removes the memctx parameter and allocates krb5_servers temporarily on NULL and ensures that it is freed on all exit conditions. It is not necessary to retain this memory, as dp_opt_set_string() performs a talloc_strdup onto the appropriate context internally. It also updates the DEBUG messages for this function to the appropriate new macro levels.
Diffstat (limited to 'src/providers/ipa')
-rw-r--r--src/providers/ipa/ipa_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c
index b816f997..148a8b71 100644
--- a/src/providers/ipa/ipa_common.c
+++ b/src/providers/ipa/ipa_common.c
@@ -672,7 +672,7 @@ int ipa_get_auth_options(struct ipa_options *ipa_opts,
/* If there is no KDC, try the deprecated krb5_kdcip option, too */
/* FIXME - this can be removed in a future version */
- ret = krb5_try_kdcip(ipa_opts, cdb, conf_path, ipa_opts->auth, KRB5_KDC);
+ ret = krb5_try_kdcip(cdb, conf_path, ipa_opts->auth, KRB5_KDC);
if (ret != EOK) {
DEBUG(1, ("sss_krb5_try_kdcip failed.\n"));
goto done;