Skip to content

Commit

Permalink
filterx/expr-regexp-common: avoid excessive zero initialization of Fi…
Browse files Browse the repository at this point in the history
…lterXReMatchState

Signed-off-by: Balazs Scheidler <[email protected]>
  • Loading branch information
bazsi committed Dec 30, 2024
1 parent 7c7ef1f commit de94a2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/filterx/expr-regexp-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit de94a2e

Please sign in to comment.