From de94a2edf25dae4c63cede70ec83a79e19376b05 Mon Sep 17 00:00:00 2001 From: Balazs Scheidler Date: Sun, 29 Dec 2024 23:47:07 +0100 Subject: [PATCH] filterx/expr-regexp-common: avoid excessive zero initialization of FilterXReMatchState Signed-off-by: Balazs Scheidler --- lib/filterx/expr-regexp-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/filterx/expr-regexp-common.c b/lib/filterx/expr-regexp-common.c index 6f352fda9..df2cef13d 100644 --- a/lib/filterx/expr-regexp-common.c +++ b/lib/filterx/expr-regexp-common.c @@ -69,7 +69,8 @@ filterx_regexp_compile_pattern_defaults(const gchar *pattern) void filterx_expr_rematch_state_init(FilterXReMatchState *state) { - memset(state, 0, sizeof(FilterXReMatchState)); + state->match_data = NULL; + state->lhs_obj = NULL; } void @@ -78,7 +79,6 @@ filterx_expr_rematch_state_cleanup(FilterXReMatchState *state) if (state->match_data) pcre2_match_data_free(state->match_data); filterx_object_unref(state->lhs_obj); - memset(state, 0, sizeof(FilterXReMatchState)); } gboolean