From: Willy Tarreau Date: Mon, 22 Mar 2021 20:02:50 +0000 (+0100) Subject: CLEANUP: filters: use pool_zalloc() in flt_stream_add_filter() X-Git-Tag: v2.4-dev14~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bbec3883ad84cedef76f0e64b89c3c07814f7e7;p=thirdparty%2Fhaproxy.git CLEANUP: filters: use pool_zalloc() in flt_stream_add_filter() This one used to alloc then zero the area, let's have the allocator do it. --- diff --git a/src/filters.c b/src/filters.c index 026d1c93af..859092be5a 100644 --- a/src/filters.c +++ b/src/filters.c @@ -398,10 +398,9 @@ flt_stream_add_filter(struct stream *s, struct flt_conf *fconf, unsigned int fla if (IS_HTX_STRM(s) && !(fconf->flags & FLT_CFG_FL_HTX)) return 0; - f = pool_alloc(pool_head_filter); + f = pool_zalloc(pool_head_filter); if (!f) /* not enough memory */ return -1; - memset(f, 0, sizeof(*f)); f->config = fconf; f->flags |= flags;