Fix: fully initialize viewer stream before publishing it
[deliverable/lttng-tools.git] / src / bin / lttng-relayd / viewer-stream.c
index 60aa4371d5cc446bb4dac4bdd654e13d45adc9ea..3c6926299a438fadb4827b8b39d5db05ad1a2fa0 100644 (file)
@@ -143,9 +143,8 @@ struct relay_viewer_stream *viewer_stream_create(struct relay_stream *stream,
 
        /* Globally visible after the add unique. */
        lttng_ht_node_init_u64(&vstream->stream_n, stream->stream_handle);
-       lttng_ht_add_unique_u64(viewer_streams_ht, &vstream->stream_n);
-
        urcu_ref_init(&vstream->ref);
+       lttng_ht_add_unique_u64(viewer_streams_ht, &vstream->stream_n);
 
        return vstream;
 
This page took 0.027994 seconds and 5 git commands to generate.