[lttng-tools,v2,2/5] Fix: calling ht_{hash, match}_enum with wrong argument
diff mbox series

Message ID 1518213412-16593-3-git-send-email-francis.deslauriers@efficios.com
State Accepted
Delegated to: Jérémie Galarneau
Headers show
Series
  • Support probes with the same name but different event payload
Related show

Commit Message

Francis Deslauriers Feb. 9, 2018, 9:56 p.m. UTC
ht_hash_enum and ht_match_enum are currently called with the address of the
pointer to a ust_registry_enum rather than the expected pointer to a
ust_registry_enum. This means that those function calls would end up
using garbage for hashing and comparing.

Signed-off-by: Francis Deslauriers <francis.deslauriers at efficios.com>
---
 src/bin/lttng-sessiond/ust-registry.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/src/bin/lttng-sessiond/ust-registry.c b/src/bin/lttng-sessiond/ust-registry.c
index a875515..19bd30f 100644
--- a/src/bin/lttng-sessiond/ust-registry.c
+++ b/src/bin/lttng-sessiond/ust-registry.c
@@ -558,8 +558,8 @@  struct ust_registry_enum *
 	struct lttng_ht_iter iter;
 
 	cds_lfht_lookup(session->enums->ht,
-			ht_hash_enum((void *) &reg_enum_lookup, lttng_ht_seed),
-			ht_match_enum, &reg_enum_lookup, &iter.iter);
+			ht_hash_enum((void *) reg_enum_lookup, lttng_ht_seed),
+			ht_match_enum, reg_enum_lookup, &iter.iter);
 	node = lttng_ht_iter_get_node_str(&iter);
 	if (!node) {
 	        goto end;