summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/kadm5/clnt/client_init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/kadm5/clnt/client_init.c b/src/lib/kadm5/clnt/client_init.c
index 82e417159..95c4954ef 100644
--- a/src/lib/kadm5/clnt/client_init.c
+++ b/src/lib/kadm5/clnt/client_init.c
@@ -174,6 +174,7 @@ static kadm5_ret_t _kadm5_init_any(krb5_context context, char *client_name,
int iprop_enable = 0;
char full_svcname[BUFSIZ];
char *realm;
+ krb5_ccache ccache;
kadm5_server_handle_t handle;
kadm5_config_params params_local;
@@ -390,6 +391,11 @@ error:
* error" before the block of code at the top of the function
* that allocates and initializes "handle".
*/
+ if (handle->destroy_cache && handle->cache_name) {
+ if (krb5_cc_resolve(handle->context,
+ handle->cache_name, &ccache) == 0)
+ (void) krb5_cc_destroy (handle->context, ccache);
+ }
if (handle->cache_name)
free(handle->cache_name);
if(handle->clnt && handle->clnt->cl_auth)
@@ -397,6 +403,8 @@ error:
if(handle->clnt)
clnt_destroy(handle->clnt);
+ kadm5_free_config_params(handle->context, &handle->params);
+
cleanup:
if (code)
free(handle);