From: Willy Tarreau Date: Mon, 22 Mar 2021 20:07:52 +0000 (+0100) Subject: CLEANUP: mailers: use pool_zalloc() in enqueue_one_email_alert() X-Git-Tag: v2.4-dev14~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ab0a0bc88b18dfb88731c37e11eb96255d229a7;p=thirdparty%2Fhaproxy.git CLEANUP: mailers: use pool_zalloc() in enqueue_one_email_alert() This one used to alloc then zero the area, let's have the allocator do it. --- diff --git a/src/mailers.c b/src/mailers.c index b65bfeb6a5..e614cf0fc3 100644 --- a/src/mailers.c +++ b/src/mailers.c @@ -184,9 +184,8 @@ static int enqueue_one_email_alert(struct proxy *p, struct server *s, LIST_INIT(&alert->rules.preset_vars); /* unused for email alerts */ alert->srv = s; - if ((tcpcheck = pool_alloc(pool_head_tcpcheck_rule)) == NULL) + if ((tcpcheck = pool_zalloc(pool_head_tcpcheck_rule)) == NULL) goto error; - memset(tcpcheck, 0, sizeof(*tcpcheck)); tcpcheck->action = TCPCHK_ACT_CONNECT; tcpcheck->comment = NULL;