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) {
|
if (context) {
|
||||||
const char *msg;
|
const char *msg;
|
||||||
|
|
||||||
heim_vset_error_message(context->hcontext, ret, fmt, args);
|
heim_vset_error_message(context ? context->hcontext : NULL, ret, fmt,
|
||||||
msg = heim_get_error_message(context->hcontext, ret);
|
args);
|
||||||
|
msg = heim_get_error_message(context ? context->hcontext : NULL, ret);
|
||||||
if (msg) {
|
if (msg) {
|
||||||
_krb5_debug(context, 100, "error message: %s: %d", msg, ret);
|
if (context)
|
||||||
heim_free_error_message(context->hcontext, msg);
|
_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