diff options
author | Martin Kosek <mkosek@redhat.com> | 2011-01-13 11:46:11 +0100 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2011-01-14 14:20:57 -0500 |
commit | a6a91e5dbc96498ef33505e4bf96466590f0da42 (patch) | |
tree | 88043773388fd2e3c0b2373264724f7b73d58aea /ipa-client/ipa-join.c | |
parent | 8173b8e375ea99d06773ea4de18fa2f32ddc1039 (diff) | |
download | freeipa-a6a91e5dbc96498ef33505e4bf96466590f0da42.tar.gz freeipa-a6a91e5dbc96498ef33505e4bf96466590f0da42.tar.xz freeipa-a6a91e5dbc96498ef33505e4bf96466590f0da42.zip |
Unitialized pointer read in ipa-join
This patch fixes a possible situation when krb5_kt_close()
function is called with uninitialized keytab parameter.
https://fedorahosted.org/freeipa/ticket/712
Diffstat (limited to 'ipa-client/ipa-join.c')
-rw-r--r-- | ipa-client/ipa-join.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipa-client/ipa-join.c b/ipa-client/ipa-join.c index fa2e11d7c..d23348954 100644 --- a/ipa-client/ipa-join.c +++ b/ipa-client/ipa-join.c @@ -664,7 +664,7 @@ unenroll_host(const char *server, const char *hostname, const char *ktname, int char *realm = NULL; krb5_context krbctx = NULL; - krb5_keytab keytab; + krb5_keytab keytab = NULL; krb5_ccache ccache = NULL; krb5_principal princ = NULL; krb5_error_code krberr; @@ -849,7 +849,7 @@ unenroll_host(const char *server, const char *hostname, const char *ktname, int cleanup: - krb5_kt_close(krbctx, keytab); + if (keytab) krb5_kt_close(krbctx, keytab); free((char *)principal); free((char *)ipaserver); if (princ) krb5_free_principal(krbctx, princ); |