projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: sessiond ht_match_event() check if filter is NULL
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
agent.c
diff --git
a/src/bin/lttng-sessiond/agent.c
b/src/bin/lttng-sessiond/agent.c
index 8e1ef0849fb13b4efb6c27e0e92c68d3fe71784d..7cbbbdee0dddfec3ef596b4d624031885fbf49b5 100644
(file)
--- a/
src/bin/lttng-sessiond/agent.c
+++ b/
src/bin/lttng-sessiond/agent.c
@@
-143,11
+143,18
@@
static int ht_match_event(struct cds_lfht_node *node,
}
/* Filter expression */
}
/* Filter expression */
- if (
strncmp(event->filter_expression, key->filter_expression,
- strlen(event->filter_expression)) != 0) {
+ if (
!!event->filter_expression ^ !!key->filter_expression) {
+ /* One has a filter expression, the other does not */
goto no_match;
}
goto no_match;
}
+ if (event->filter_expression) {
+ if (strncmp(event->filter_expression, key->filter_expression,
+ strlen(event->filter_expression)) != 0) {
+ goto no_match;
+ }
+ }
+
return 1;
no_match:
return 1;
no_match:
This page took
0.026121 seconds
and
5
git commands to generate.