mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
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.
This commit is contained in:
parent
5d110b25dd
commit
1bbec3883a
@ -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))
|
if (IS_HTX_STRM(s) && !(fconf->flags & FLT_CFG_FL_HTX))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
f = pool_alloc(pool_head_filter);
|
f = pool_zalloc(pool_head_filter);
|
||||||
if (!f) /* not enough memory */
|
if (!f) /* not enough memory */
|
||||||
return -1;
|
return -1;
|
||||||
memset(f, 0, sizeof(*f));
|
|
||||||
f->config = fconf;
|
f->config = fconf;
|
||||||
f->flags |= flags;
|
f->flags |= flags;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user