From: Alan T. DeKok Date: Mon, 4 Dec 2023 12:11:15 +0000 (-0500) Subject: file may be NULL on newer versions of OpenSSL X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93ac5e8d38f77c8e659e8ca4c3e111f248b359bd;p=thirdparty%2Ffreeradius-server.git file may be NULL on newer versions of OpenSSL --- diff --git a/src/lib/tls/base.c b/src/lib/tls/base.c index 2b74bf7c8c6..eb7ad099425 100644 --- a/src/lib/tls/base.c +++ b/src/lib/tls/base.c @@ -209,6 +209,15 @@ static void *fr_openssl_talloc(size_t len, char const *file, NDEBUG_UNUSED int l static char const *async_file; void *chunk; + if (!file) { + chunk = talloc_array(ssl_talloc_ctx, uint8_t, len); + +#ifndef NDEBUG + talloc_set_name(chunk, "fr_openssl_talloc"); +#endif + return chunk; + } + /* * Cache the filename pointer for the async_posix.c * source file, so we can figure out when we're