From: Alan T. DeKok Date: Fri, 21 May 2021 13:56:48 +0000 (-0400) Subject: ensure that the map is parented by parent, not by ctx X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=299e3db455ed00aea9786a56c0ae69e699c06f74;p=thirdparty%2Ffreeradius-server.git ensure that the map is parented by parent, not by ctx --- diff --git a/src/lib/server/map.c b/src/lib/server/map.c index 9948a119393..529b602b014 100644 --- a/src/lib/server/map.c +++ b/src/lib/server/map.c @@ -60,7 +60,11 @@ static inline map_t *map_alloc(TALLOC_CTX *ctx, map_t *parent) { map_t *map; - map = talloc_zero(ctx, map_t); + if (parent) { + map = talloc_zero(parent, map_t); + } else { + map = talloc_zero(ctx, map_t); + } map->parent = parent; fr_map_list_init(&map->child);