diff --git a/lib/kadm5/modify_c.c b/lib/kadm5/modify_c.c index 329b7396b..82fad3d60 100644 --- a/lib/kadm5/modify_c.c +++ b/lib/kadm5/modify_c.c @@ -53,7 +53,7 @@ kadm5_c_modify_principal(void *server_handle, sp = krb5_storage_from_mem(buf, sizeof(buf)); if (sp == NULL) { - krb5_clear_error_string(context->contect); + krb5_clear_error_string(context->context); return ENOMEM; } krb5_store_int32(sp, kadm_modify); @@ -68,12 +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->contect); + krb5_clear_error_string(context->context); krb5_data_free (&reply); return ENOMEM; } krb5_ret_int32(sp, &tmp); - krb5_clear_error_string(context->contect); + krb5_clear_error_string(context->context); krb5_storage_free(sp); krb5_data_free (&reply); return tmp; diff --git a/lib/kadm5/privs_c.c b/lib/kadm5/privs_c.c index acb656c49..1b17a2ca2 100644 --- a/lib/kadm5/privs_c.c +++ b/lib/kadm5/privs_c.c @@ -50,8 +50,10 @@ kadm5_c_get_privs(void *server_handle, u_int32_t *privs) 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_get_privs); ret = _kadm5_client_send(context, sp); krb5_storage_free(sp); @@ -62,10 +64,12 @@ kadm5_c_get_privs(void *server_handle, u_int32_t *privs) 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); ret = tmp; if(ret == 0){ krb5_ret_int32(sp, &tmp); diff --git a/lib/kadm5/randkey_c.c b/lib/kadm5/randkey_c.c index f091e5773..389925ab0 100644 --- a/lib/kadm5/randkey_c.c +++ b/lib/kadm5/randkey_c.c @@ -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){