diff options
Diffstat (limited to 'server/util')
-rw-r--r-- | server/util/sss_krb5.c | 16 | ||||
-rw-r--r-- | server/util/sss_krb5.h | 2 |
2 files changed, 16 insertions, 2 deletions
diff --git a/server/util/sss_krb5.c b/server/util/sss_krb5.c index 59e278ed..e96e1ba4 100644 --- a/server/util/sss_krb5.c +++ b/server/util/sss_krb5.c @@ -83,10 +83,22 @@ void KRB5_CALLCONV sss_krb5_get_init_creds_opt_free (krb5_context context, krb5_get_init_creds_opt *opt) { #ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC - krb5_get_init_creds_opt_free(context, opt); + krb5_get_init_creds_opt_free(context, opt); #else - free(opt); + free(opt); #endif return; } + +void KRB5_CALLCONV sss_krb5_free_unparsed_name(krb5_context context, char *name) +{ +#ifdef HAVE_KRB5_FREE_UNPARSED_NAME + krb5_free_unparsed_name(context, name); +#else + if (name != NULL) { + memset(name, 0, strlen(name)); + free(name); + } +#endif +} diff --git a/server/util/sss_krb5.h b/server/util/sss_krb5.h index 755cf816..342196d3 100644 --- a/server/util/sss_krb5.h +++ b/server/util/sss_krb5.h @@ -42,4 +42,6 @@ krb5_error_code KRB5_CALLCONV sss_krb5_get_init_creds_opt_alloc( void KRB5_CALLCONV sss_krb5_get_init_creds_opt_free (krb5_context context, krb5_get_init_creds_opt *opt); + +void KRB5_CALLCONV sss_krb5_free_unparsed_name(krb5_context context, char *name); #endif /* __SSS_KRB5_H__ */ |