Fix: empty indexes_ht before destroying it.
authorJulien Desfossez <jdesfossez@efficios.com>
Tue, 11 Nov 2014 20:57:48 +0000 (15:57 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 16 Nov 2014 12:23:20 +0000 (07:23 -0500)
Fixes: #722
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/main.c

index 802d7e107abf019720f95b52fabdf556d68df9fb..1b3dcc9b531f62718da40fb5a68f84ee07136ae8 100644 (file)
@@ -2427,6 +2427,7 @@ void *relay_thread_worker(void *data)
        struct lttcomm_relayd_hdr recv_hdr;
        struct relay_local_data *relay_ctx = (struct relay_local_data *) data;
        struct lttng_ht *sessions_ht = relay_ctx->sessions_ht;
+       struct relay_index *index;
 
        DBG("[thread] Relay worker started");
 
@@ -2658,6 +2659,14 @@ error:
        }
        rcu_read_unlock();
 error_poll_create:
+       rcu_read_lock();
+       cds_lfht_for_each_entry(indexes_ht->ht, &iter.iter, index,
+                       index_n.node) {
+               health_code_update();
+               relay_index_delete(index);
+               relay_index_free_safe(index);
+       }
+       rcu_read_unlock();
        lttng_ht_destroy(indexes_ht);
 indexes_ht_error:
        lttng_ht_destroy(relay_connections_ht);
This page took 0.034392 seconds and 4 git commands to generate.