diff options
Diffstat (limited to 'crypto/heimdal/lib/kadm5/randkey_c.c')
-rw-r--r-- | crypto/heimdal/lib/kadm5/randkey_c.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/heimdal/lib/kadm5/randkey_c.c b/crypto/heimdal/lib/kadm5/randkey_c.c index eedf697..60a3f53 100644 --- a/crypto/heimdal/lib/kadm5/randkey_c.c +++ b/crypto/heimdal/lib/kadm5/randkey_c.c @@ -33,7 +33,7 @@ #include "kadm5_locl.h" -RCSID("$Id: randkey_c.c,v 1.4 2000/07/11 16:00:02 joda Exp $"); +RCSID("$Id: randkey_c.c 16662 2006-01-25 12:53:09Z lha $"); kadm5_ret_t kadm5_c_randkey_principal(void *server_handle, @@ -53,8 +53,10 @@ kadm5_c_randkey_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_randkey); krb5_store_principal(sp, princ); ret = _kadm5_client_send(context, sp); @@ -66,9 +68,11 @@ kadm5_c_randkey_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_clear_error_string(context->context); krb5_ret_int32(sp, &tmp); ret = tmp; if(ret == 0){ |