Fix: calling ht_{hash, match}_enum with wrong argument
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 9 Feb 2018 21:56:49 +0000 (16:56 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 30 May 2018 18:45:36 +0000 (14:45 -0400)
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@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-registry.c

index 61b5c59f222415f90a846f17932ae0747074b433..0c944a73b7822d93bd2ca499f72bfb46ff2bd8a8 100644 (file)
@@ -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;
This page took 0.02631 seconds and 4 git commands to generate.