8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / krb5 / kadm5 / srv / svr_misc_free.c
blob645eaa285425bc3066c01e56af507cd40182a8e0
1 /*
2 * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
4 * Openvision retains the copyright to derivative works of
5 * this source code. Do *NOT* create a derivative of this
6 * source code before consulting with your legal department.
7 * Do *NOT* integrate *ANY* of this source code into another
8 * product before consulting with your legal department.
10 * For further information, read the top-level Openvision
11 * copyright which is contained in the top-level MIT Kerberos
12 * copyright.
14 * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
20 * Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved
22 * $Header$
26 #if !defined(lint) && !defined(__CODECENTER__)
27 static char *rcsid = "$Header$";
28 #endif
29 #include <kadm5/admin.h>
30 #include <stdlib.h>
31 #include "server_internal.h"
33 kadm5_ret_t
34 kadm5_free_principal_ent(void *server_handle,
35 kadm5_principal_ent_t val)
37 kadm5_server_handle_t handle = server_handle;
39 CHECK_HANDLE(server_handle);
41 if(val) {
42 if(val->principal)
43 krb5_free_principal(handle->context, val->principal);
44 if(val->mod_name)
45 krb5_free_principal(handle->context, val->mod_name);
46 if(val->policy)
47 free(val->policy);
49 /* XXX free key_data and tl_data */
51 if (handle->api_version == KADM5_API_VERSION_1)
52 free(val);
54 return KADM5_OK;