From 0d5d001d7df80ba9e8c9026b48b8995ca15c38dd Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 29 Nov 2011 18:54:25 -0500 Subject: [PATCH] Fix ust_app_clean_list segfault 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 --- lttng-sessiond/ust-app.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lttng-sessiond/ust-app.c b/lttng-sessiond/ust-app.c index 8e7a0ce1d..047225143 100644 --- a/lttng-sessiond/ust-app.c +++ b/lttng-sessiond/ust-app.c @@ -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); -- 2.34.1