that we can use the krb5_get_error_message interface internally.
* kdb5.h: Add release_errcode_string field to the interface.
* db2_exp.c, ldap_exp.c: Initialize it.
* ldap_misc.c: Use krb5_get/free_error_message for error message strings.
* kdb_ldap.h: Declare krb5_ldap_release_errcode_string.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18565
dc483132-0cff-0310-8789-
dd5450dbe970
const char * (*errcode_2_string) (krb5_context kcontext,
long err_code);
+ void (*release_errcode_string) (krb5_context kcontext, const char *msg);
void * (*db_alloc) (krb5_context kcontext, void *ptr, size_t size);
void (*db_free) (krb5_context kcontext, void *ptr);
/* db_supported_realms */ NULL,
/* db_free_supported_realms */ NULL,
/* errcode_2_string */ NULL,
+ /* release_errcode_string */ NULL,
/* db_alloc */ wrap_krb5_db2_alloc,
/* db_free */ wrap_krb5_db2_free,
/* set_master_key */ wrap_krb5_db2_set_master_key_ext,
/* db_supported_realms */ krb5_ldap_supported_realms,
/* db_free_supported_realms */ krb5_ldap_free_supported_realms,
/* errcode_2_string */ krb5_ldap_errcode_2_string,
+ /* release_errcode_string */ krb5_ldap_release_errcode_string,
/* db_alloc */ krb5_ldap_alloc,
/* db_free */ krb5_ldap_free,
/* optional functions */
const char *
krb5_ldap_errcode_2_string( krb5_context, long );
+void
+krb5_ldap_release_errcode_string (krb5_context, const char *);
+
#endif
const char *
krb5_ldap_errcode_2_string(krb5_context kcontext, long err_code)
{
- return error_message(err_code);
+ return krb5_get_error_message(kcontext, err_code);
}
+void
+krb5_ldap_release_errcode_string(krb5_context kcontext, const char *msg)
+{
+ krb5_free_error_message(kcontext, msg);
+}