From 70490ebb12282091ab4076475309388fb226974c Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 22 Mar 2021 21:08:50 +0100 Subject: [PATCH] CLEANUP: resolvers: use pool_zalloc() in resolv_link_resolution() This one used to alloc then zero the area, let's have the allocator do it. --- src/resolvers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/resolvers.c b/src/resolvers.c index c14b9706a..b6b8982e3 100644 --- a/src/resolvers.c +++ b/src/resolvers.c @@ -1660,9 +1660,8 @@ static struct resolv_resolution *resolv_pick_resolution(struct resolvers *resolv from_pool: /* No resolution could be found, so let's allocate a new one */ - res = pool_alloc(resolv_resolution_pool); + res = pool_zalloc(resolv_resolution_pool); if (res) { - memset(res, 0, sizeof(*res)); res->resolvers = resolvers; res->uuid = resolution_uuid; res->status = RSLV_STATUS_NONE;