aboutsummaryrefslogtreecommitdiff
path: root/crypto/heimdal/lib/kadm5/modify_c.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/lib/kadm5/modify_c.c')
-rw-r--r--crypto/heimdal/lib/kadm5/modify_c.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/crypto/heimdal/lib/kadm5/modify_c.c b/crypto/heimdal/lib/kadm5/modify_c.c
index 8d8ca56bb268..ed399b3ce8de 100644
--- a/crypto/heimdal/lib/kadm5/modify_c.c
+++ b/crypto/heimdal/lib/kadm5/modify_c.c
@@ -33,12 +33,12 @@
#include "kadm5_locl.h"
-RCSID("$Id: modify_c.c,v 1.4 2000/07/11 15:59:46 joda Exp $");
+RCSID("$Id: modify_c.c 17445 2006-05-05 10:37:46Z lha $");
kadm5_ret_t
kadm5_c_modify_principal(void *server_handle,
kadm5_principal_ent_t princ,
- u_int32_t mask)
+ uint32_t mask)
{
kadm5_client_context *context = server_handle;
kadm5_ret_t ret;
@@ -52,8 +52,10 @@ kadm5_c_modify_principal(void *server_handle,
return ret;
sp = krb5_storage_from_mem(buf, sizeof(buf));
- if (sp == NULL)
+ if (sp == NULL) {
+ krb5_clear_error_string(context->context);
return ENOMEM;
+ }
krb5_store_int32(sp, kadm_modify);
kadm5_store_principal_ent(sp, princ);
krb5_store_int32(sp, mask);
@@ -66,10 +68,12 @@ kadm5_c_modify_principal(void *server_handle,
return ret;
sp = krb5_storage_from_data (&reply);
if (sp == NULL) {
+ krb5_clear_error_string(context->context);
krb5_data_free (&reply);
return ENOMEM;
}
krb5_ret_int32(sp, &tmp);
+ krb5_clear_error_string(context->context);
krb5_storage_free(sp);
krb5_data_free (&reply);
return tmp;