diff options
author | Greg Hudson <ghudson@mit.edu> | 2010-07-08 23:51:24 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2010-07-08 23:51:24 +0000 |
commit | 00b20720cc46f37347e5327aefba3128f3ece196 (patch) | |
tree | 90cd07acbf5d24c25baef9ed7ba3153b286e0777 /src/lib/kadm5 | |
parent | e220a6288b10e1f9280e8aa2cb18ad56391e0a45 (diff) | |
download | krb5-00b20720cc46f37347e5327aefba3128f3ece196.zip krb5-00b20720cc46f37347e5327aefba3128f3ece196.tar.gz krb5-00b20720cc46f37347e5327aefba3128f3ece196.tar.bz2 |
Fix a memory leak in libkadm5clnt's get_init_creds()
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24179 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/kadm5')
-rw-r--r-- | src/lib/kadm5/clnt/client_init.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/kadm5/clnt/client_init.c b/src/lib/kadm5/clnt/client_init.c index cc9664f..735ddfd 100644 --- a/src/lib/kadm5/clnt/client_init.c +++ b/src/lib/kadm5/clnt/client_init.c @@ -391,12 +391,10 @@ get_init_creds(kadm5_server_handle_t handle, char *client_name, unsigned int full_svcname_len) { kadm5_ret_t code; - krb5_principal client; - krb5_ccache ccache; + krb5_principal client = NULL; + krb5_ccache ccache = NULL; char svcname[BUFSIZ]; - client = NULL; - ccache = NULL; /* NULL svcname means use host-based. */ if (svcname_in == NULL) { code = kadm5_get_admin_service_name(handle->context, @@ -463,6 +461,7 @@ get_init_creds(kadm5_server_handle_t handle, char *client_name, code = KADM5_SECURE_PRINC_MISSING; error: + krb5_free_principal(handle->context, client); if (ccache != NULL && init_type != INIT_CREDS) krb5_cc_close(handle->context, ccache); return code; |