summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/kadm5/destroy_s.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/lib/kadm5/destroy_s.c')
-rw-r--r--crypto/heimdal/lib/kadm5/destroy_s.c37
1 files changed, 34 insertions, 3 deletions
diff --git a/crypto/heimdal/lib/kadm5/destroy_s.c b/crypto/heimdal/lib/kadm5/destroy_s.c
index 22158d0..a8ad328 100644
--- a/crypto/heimdal/lib/kadm5/destroy_s.c
+++ b/crypto/heimdal/lib/kadm5/destroy_s.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997 - 1999 Kungliga Tekniska Högskolan
+ * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -33,7 +33,35 @@
#include "kadm5_locl.h"
-RCSID("$Id: destroy_s.c,v 1.5 1999/12/02 17:05:05 joda Exp $");
+RCSID("$Id: destroy_s.c,v 1.6 2000/05/12 15:23:13 assar Exp $");
+
+/*
+ * dealloc a `kadm5_config_params'
+ */
+
+static void
+destroy_config (kadm5_config_params *c)
+{
+ free (c->realm);
+ free (c->dbname);
+ free (c->acl_file);
+ free (c->stash_file);
+}
+
+/*
+ * dealloc a kadm5_log_context
+ */
+
+static void
+destroy_kadm5_log_context (kadm5_log_context *c)
+{
+ free (c->log_file);
+ close (c->socket_fd);
+}
+
+/*
+ * destroy a kadm5 handle
+ */
kadm5_ret_t
kadm5_s_destroy(void *server_handle)
@@ -43,8 +71,11 @@ kadm5_s_destroy(void *server_handle)
krb5_context kcontext = context->context;
ret = context->db->destroy(kcontext, context->db);
+ destroy_kadm5_log_context (&context->log_context);
+ destroy_config (&context->config);
+ krb5_free_principal (kcontext, context->caller);
if(context->my_context)
krb5_free_context(kcontext);
+ free (context);
return ret;
}
-
OpenPOWER on IntegriCloud