Fix: Check for NULL hash tables on relay daemon teardown
[lttng-tools.git] / src / bin / lttng-relayd / stream.c
index 02bf9dd54995ed2aab6d026ecb578d9127610908..335a1cf5f79de497f3002beb3ae0a2a983da355f 100644 (file)
@@ -17,7 +17,6 @@
  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#define _GNU_SOURCE
 #define _LGPL_SOURCE
 #include <common/common.h>
 #include <common/utils.h>
@@ -447,6 +446,10 @@ void print_relay_streams(void)
        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) {
This page took 0.023193 seconds and 4 git commands to generate.