Skip to content

Commit

Permalink
filterx: fix filterx_scope_clone() for a variable that was previously…
Browse files Browse the repository at this point in the history
… unset()

Signed-off-by: Balazs Scheidler <[email protected]>
  • Loading branch information
bazsi committed May 7, 2024
1 parent a8443c8 commit 10a723d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/filterx/filterx-scope.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@ filterx_scope_clone(FilterXScope *other)
FilterXVariable *v_clone = &g_array_index(self->variables, FilterXVariable, dst_index);

v_clone->generation = 0;
v_clone->value = filterx_object_clone(v->value);
if (v->value)
v_clone->value = filterx_object_clone(v->value);
else
v_clone->value = NULL;
dst_index++;
msg_trace("Filterx scope, cloning scope variable",
evt_tag_str("variable", log_msg_get_value_name((v->handle & ~FILTERX_HANDLE_FLOATING_BIT), NULL)));
Expand Down

0 comments on commit 10a723d

Please sign in to comment.