From 4151df32c1fa0a9956f6386865c82366ba3d1130 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 29 Mar 2024 21:27:06 +0100 Subject: [PATCH] filter: zero internal structure Valgrind noticed access to unitialized warned_filter. --- lib/filters/filter-regex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/filters/filter-regex.c b/lib/filters/filter-regex.c index 5f348674d..a6da86036 100644 --- a/lib/filters/filter-regex.c +++ b/lib/filters/filter-regex.c @@ -225,7 +225,7 @@ struct dev_filter *regex_filter_create(const struct dm_config_value *patterns, i if (!mem) return_NULL; - if (!(rf = dm_pool_alloc(mem, sizeof(*rf)))) + if (!(rf = dm_pool_zalloc(mem, sizeof(*rf)))) goto_bad; rf->mem = mem;