From: Willy Tarreau Date: Mon, 22 Mar 2021 20:08:50 +0000 (+0100) Subject: CLEANUP: resolvers: use pool_zalloc() in resolv_link_resolution() X-Git-Tag: v2.4-dev14~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=70490ebb12282091ab4076475309388fb226974c;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/resolvers.c b/src/resolvers.c index c14b9706ad..b6b8982e31 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;