X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fstream.c;h=c59bb9416b1c9609ca34884cbc6126daf1295b78;hb=5feafd413038626a47de89c0b29e41673b68818a;hp=02bf9dd54995ed2aab6d026ecb578d9127610908;hpb=36d2e35df61339e4394e84ad9790b984d259e0f0;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/stream.c b/src/bin/lttng-relayd/stream.c index 02bf9dd54..c59bb9416 100644 --- a/src/bin/lttng-relayd/stream.c +++ b/src/bin/lttng-relayd/stream.c @@ -17,7 +17,6 @@ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include @@ -307,9 +306,9 @@ static void stream_release(struct urcu_ref *ref) stream_fd_put(stream->stream_fd); stream->stream_fd = NULL; } - if (stream->index_fd) { - stream_fd_put(stream->index_fd); - stream->index_fd = NULL; + if (stream->index_file) { + lttng_index_file_put(stream->index_file); + stream->index_file = NULL; } if (stream->trace) { ctf_trace_put(stream->trace); @@ -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) {