]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Use workaround for error logging in connection.c 1861/head
authorHerwin Weststrate <herwin@snt.utwente.nl>
Sun, 27 Nov 2016 14:17:24 +0000 (15:17 +0100)
committerHerwin Weststrate <herwin@snt.utwente.nl>
Sun, 27 Nov 2016 14:17:24 +0000 (15:17 +0100)
We have defined a LOG_PREFIX_ARGS that will cause a null pointer
dereference in this specific scenario.

src/main/connection.c

index 6a785a4fc1e98b4501ef650e9e5c61564dd425bc..2cb69cde19c858cdbf4298495d34473e4e33cb75 100644 (file)
@@ -969,7 +969,8 @@ fr_connection_pool_t *fr_connection_pool_init(TALLOC_CTX *ctx,
         */
        pool = talloc_zero(NULL, fr_connection_pool_t);
        if (!pool) {
-               ERROR("%s: Out of memory", __FUNCTION__);
+               /* Simply using ERROR here results in a null pointer dereference */
+               _RADLOG(L_ERR, "%s: Out of memory", __FUNCTION__);
                return NULL;
        }