X-Git-Url: https://git.exim.org/users/jgh/exim.git/blobdiff_plain/e51462229029e40afa0932dd9c6337192a0dc70b..cf0c61644d7dd2dfb29f6418d95bf4d8cae199ea:/src/src/tls.c diff --git a/src/src/tls.c b/src/src/tls.c index f34cf6321..a5cb35bd9 100644 --- a/src/src/tls.c +++ b/src/src/tls.c @@ -64,17 +64,18 @@ Returns: TRUE if OK; result may still be NULL after forced failure */ static BOOL -expand_check(const uschar *s, const uschar *name, uschar **result) +expand_check(const uschar *s, const uschar *name, uschar **result, uschar ** errstr) { -if (s == NULL) *result = NULL; else +if (!s) + *result = NULL; +else if ( !(*result = expand_string(US s)) /* need to clean up const more */ + && !expand_string_forcedfail + ) { - *result = expand_string(US s); /* need to clean up const some more */ - if (*result == NULL && !expand_string_forcedfail) - { - log_write(0, LOG_MAIN|LOG_PANIC, "expansion of %s failed: %s", name, - expand_string_message); - return FALSE; - } + *errstr = US"Internal error"; + log_write(0, LOG_MAIN|LOG_PANIC, "expansion of %s failed: %s", name, + expand_string_message); + return FALSE; } return TRUE; }