From: Arran Cudbard-Bell Date: Thu, 27 Aug 2020 20:16:29 +0000 (-0500) Subject: Only attempt to link ctxs if we have a ctx to link X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb66438a52dba4c0e4d6158906dcbf04a361df4c;p=thirdparty%2Ffreeradius-server.git Only attempt to link ctxs if we have a ctx to link --- diff --git a/src/lib/server/pool.c b/src/lib/server/pool.c index b8eb92d1a2c..5ae31f1430c 100644 --- a/src/lib/server/pool.c +++ b/src/lib/server/pool.c @@ -954,7 +954,7 @@ fr_pool_t *fr_pool_init(TALLOC_CTX *ctx, * Ensure the pool is freed at the same time * as its parent. */ - if (talloc_link_ctx(ctx, pool) < 0) { + if (ctx && (talloc_link_ctx(ctx, pool) < 0)) { PERROR("%s: Failed linking pool ctx", __FUNCTION__); talloc_free(pool);