]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Only attempt to link ctxs if we have a ctx to link
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 27 Aug 2020 20:16:29 +0000 (15:16 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 27 Aug 2020 20:16:29 +0000 (15:16 -0500)
src/lib/server/pool.c

index b8eb92d1a2cceee5b05253a501547adc9769d5cd..5ae31f1430c3faeb597a543afc7d348306b17275 100644 (file)
@@ -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);