Fix ust_app_clean_list segfault
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 29 Nov 2011 23:54:25 +0000 (18:54 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 29 Nov 2011 23:54:25 +0000 (18:54 -0500)
The 4th parameter of cds_lfht_for_each_entry is the member of the
structure, not a pointer to a variable. Therefore, node was never
populated.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-sessiond/ust-app.c

index 8e7a0ce1dd5e45469659991a7f1a80442fc9bc0c..0472251434dbb8fb1953ceda2777ce7a46412adb 100644 (file)
@@ -1217,7 +1217,6 @@ error:
 void ust_app_clean_list(void)
 {
        int ret;
-       struct cds_lfht_node *node;
        struct cds_lfht_iter iter;
        struct ust_app *app;
 
@@ -1228,7 +1227,7 @@ void ust_app_clean_list(void)
        cds_lfht_for_each_entry(ust_app_ht, &iter, app, node) {
                ret = hashtable_del(ust_app_ht, &iter);
                assert(!ret);
-               call_rcu(&node->head, delete_ust_app_rcu);
+               call_rcu(&iter.node->head, delete_ust_app_rcu);
        }
 
        hashtable_destroy(ust_app_ht);
This page took 0.027156 seconds and 4 git commands to generate.