krb5: Context must be optional for error functions
We pass a NULL context to error functions in CCAPI (lib/krb5/acache.c) code paths.
This commit is contained in:
@@ -98,11 +98,13 @@ krb5_vset_error_message(krb5_context context, krb5_error_code ret,
|
||||
if (context) {
|
||||
const char *msg;
|
||||
|
||||
heim_vset_error_message(context->hcontext, ret, fmt, args);
|
||||
msg = heim_get_error_message(context->hcontext, ret);
|
||||
heim_vset_error_message(context ? context->hcontext : NULL, ret, fmt,
|
||||
args);
|
||||
msg = heim_get_error_message(context ? context->hcontext : NULL, ret);
|
||||
if (msg) {
|
||||
_krb5_debug(context, 100, "error message: %s: %d", msg, ret);
|
||||
heim_free_error_message(context->hcontext, msg);
|
||||
if (context)
|
||||
_krb5_debug(context, 100, "error message: %s: %d", msg, ret);
|
||||
heim_free_error_message(context ? context->hcontext : NULL, msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user