mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 23:50:03 -06:00
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
This commit is contained in:
parent
8173b8e375
commit
a6a91e5dbc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user