diff options
author | Greg Hudson <ghudson@mit.edu> | 2013-03-28 02:08:45 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2013-03-28 02:08:45 -0400 |
commit | c4549f8f91fe53830f1e7d68d6d1f7b1a117a911 (patch) | |
tree | 1465fed7b86eb0b65d6c8805fa190d4f4d419f38 /src/lib/krb5 | |
parent | 58871c23ee9b5a9201f479127fda65e7fcf06310 (diff) | |
download | krb5-c4549f8f91fe53830f1e7d68d6d1f7b1a117a911.tar.gz krb5-c4549f8f91fe53830f1e7d68d6d1f7b1a117a911.tar.xz krb5-c4549f8f91fe53830f1e7d68d6d1f7b1a117a911.zip |
Fix an error case in krb5_sendauth
If we fail to get the client principal when constructing the
stack-allocated creds structure, don't double-free creds.server.
Diffstat (limited to 'src/lib/krb5')
-rw-r--r-- | src/lib/krb5/krb/sendauth.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/krb5/krb/sendauth.c b/src/lib/krb5/krb/sendauth.c index b1dde3c755..f7e6777411 100644 --- a/src/lib/krb5/krb/sendauth.c +++ b/src/lib/krb5/krb/sendauth.c @@ -108,10 +108,8 @@ krb5_sendauth(krb5_context context, krb5_auth_context *auth_context, else retval = krb5_cc_get_principal(context, use_ccache, &creds.client); - if (retval) { - krb5_free_principal(context, creds.server); + if (retval) goto error_return; - } /* creds.times.endtime = 0; -- memset 0 takes care of this zero means "as long as possible" */ /* creds.keyblock.enctype = 0; -- as well as this. |