]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
file may be NULL on newer versions of OpenSSL
authorAlan T. DeKok <aland@freeradius.org>
Mon, 4 Dec 2023 12:11:15 +0000 (07:11 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 5 Dec 2023 00:35:10 +0000 (19:35 -0500)
src/lib/tls/base.c

index 2b74bf7c8c642163ea261cfd51f75ba3dd7ee5a8..eb7ad099425347b9101e75c1bbc474e585406dc7 100644 (file)
@@ -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