summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
authorWill Fiveash <Will.Fiveash@Sun.COM>2010-02-26 15:06:26 -0600
committerWill Fiveash <Will.Fiveash@Sun.COM>2010-02-26 15:06:26 -0600
commit33a8868f5d61bfb49bed584d9bb4badf34b11bb7 (patch)
tree634661e47661376058275d35d7ae5bff136055a3 /usr/src/lib
parent70f41fc1780388c4982cfd631297b0fe7df26d8c (diff)
downloadillumos-gate-33a8868f5d61bfb49bed584d9bb4badf34b11bb7.tar.gz
6889700 __krb5_get_init_creds_password leaks krb5_gic_opt_ext *opte
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/gss_mechs/mech_krb5/krb5/krb/gic_pwd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/gic_pwd.c b/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/gic_pwd.c
index 1deca3028e..43416a36c0 100644
--- a/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/gic_pwd.c
+++ b/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/gic_pwd.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -169,7 +169,6 @@ __krb5_get_init_creds_password(
krb5_kdc_rep *as_reply;
int tries;
krb5_creds chpw_creds;
- krb5_get_init_creds_opt *chpw_opts = NULL;
krb5_data pw0, pw1;
char banner[1024], pw0array[1024], pw1array[1024];
krb5_prompt prompt[2];
@@ -487,6 +486,8 @@ cleanup:
free(cpw_service);
free(princ_str);
+ if (opte && krb5_gic_opt_is_shadowed(opte))
+ krb5_get_init_creds_opt_free(context, (krb5_get_init_creds_opt *)opte);
memset(pw0array, 0, sizeof(pw0array));
memset(pw1array, 0, sizeof(pw1array));
krb5_free_cred_contents(context, &chpw_creds);