From: Mathieu Desnoyers Date: Tue, 29 Nov 2011 23:54:25 +0000 (-0500) Subject: Fix ust_app_clean_list segfault X-Git-Tag: v2.0-pre15~58 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=0d5d001d7df80ba9e8c9026b48b8995ca15c38dd;ds=sidebyside 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 --- 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);