-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filterx: fix switch eval errors #527
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Attila Szakacs <[email protected]>
lib/filterx/expr-switch.c
Outdated
@@ -187,8 +187,18 @@ _find_matching_case(FilterXSwitch *self, FilterXObject *selector) | |||
FilterXSwitchCase *switch_case = (FilterXSwitchCase *) g_ptr_array_index(self->cases, i); | |||
|
|||
FilterXObject *value = _eval_switch_case(switch_case); | |||
if (!value) | |||
{ | |||
filterx_object_unref(value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not needed, as value is NULL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is approved. The extra filterx_object_unref() is not harmful, so not critical.
Signed-off-by: Attila Szakacs <[email protected]>
Signed-off-by: Attila Szakacs <[email protected]>
Signed-off-by: Attila Szakacs <[email protected]>
Signed-off-by: Attila Szakacs <[email protected]>
70de69f
to
0be2bd2
Compare
@bazsi True, I updated the code. |
No description provided.