From 82e00128a26bdbf5cf2789ec58dd561ebb54b0ba Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Wed, 19 Jan 2022 23:30:55 -0600 Subject: [PATCH] base: Context has to be opt. in for error functions This is needed so that it can be optional for path token expansion, which has to have the context be optional for ccapi (lib/krb5/acache.c), which in some cases calls path token expansion functions w/ a NULL context. --- lib/base/error_string.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/base/error_string.c b/lib/base/error_string.c index fba080db7..a562833a9 100644 --- a/lib/base/error_string.c +++ b/lib/base/error_string.c @@ -55,7 +55,8 @@ heim_set_error_message(heim_context context, heim_error_code ret, va_list ap; va_start(ap, fmt); - heim_vset_error_message(context, ret, fmt, ap); + if (context) + heim_vset_error_message(context, ret, fmt, ap); va_end(ap); }