The relay daemon will log any "leaked" object on exit. However,
some errors encountered early-on during the daemon's
initialization may result in the teardown being executed with
uninitialized hash tables.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
struct lttng_ht_iter iter;
struct relay_session *session;
+ if (!sessions_ht) {
+ return;
+ }
+
rcu_read_lock();
cds_lfht_for_each_entry(sessions_ht->ht, &iter.iter, session,
session_n.node) {
struct lttng_ht_iter iter;
struct relay_stream *stream;
+ if (!relay_streams_ht) {
+ return;
+ }
+
rcu_read_lock();
cds_lfht_for_each_entry(relay_streams_ht->ht, &iter.iter, stream,
node.node) {
struct lttng_ht_iter iter;
struct relay_viewer_stream *vstream;
+ if (!viewer_streams_ht) {
+ return;
+ }
+
rcu_read_lock();
cds_lfht_for_each_entry(viewer_streams_ht->ht, &iter.iter, vstream,
stream_n.node) {