diff --git a/lib/krb5/error_string.c b/lib/krb5/error_string.c index ed82c6cdc..da86b375f 100644 --- a/lib/krb5/error_string.c +++ b/lib/krb5/error_string.c @@ -95,17 +95,16 @@ krb5_vset_error_message(krb5_context context, krb5_error_code ret, const char *fmt, va_list args) __attribute__ ((__format__ (__printf__, 3, 0))) { - if (context) { - const char *msg; + const char *msg; - heim_vset_error_message(context ? context->hcontext : NULL, ret, fmt, - args); - msg = heim_get_error_message(context ? context->hcontext : NULL, ret); - if (msg) { - if (context) - _krb5_debug(context, 100, "error message: %s: %d", msg, ret); - heim_free_error_message(context ? context->hcontext : NULL, msg); - } + if (context == NULL) + return; + + heim_vset_error_message(context->hcontext, ret, fmt, args); + msg = heim_get_error_message(context->hcontext, ret); + if (msg) { + _krb5_debug(context, 100, "error message: %s: %d", msg, ret); + heim_free_error_message(context->hcontext, msg); } }