X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer-stream.c;h=2fda11301c55493bb8a71e1d64b7b36c8bf564b6;hp=47f2eb2171fa2883d84ce8a7dfe8830fa10134fb;hb=a4f8cf4363efb13b0b5e136a35ddeb0c82f9beca;hpb=207c579fac656e2bcc5f5beea673eb5354160ade diff --git a/src/common/consumer/consumer-stream.c b/src/common/consumer/consumer-stream.c index 47f2eb217..2fda11301 100644 --- a/src/common/consumer/consumer-stream.c +++ b/src/common/consumer/consumer-stream.c @@ -479,13 +479,14 @@ struct lttng_consumer_stream *consumer_stream_create( goto end; } + rcu_read_lock(); + if (trace_chunk && !lttng_trace_chunk_get(trace_chunk)) { ERR("Failed to acquire trace chunk reference during the creation of a stream"); ret = -1; goto error; } - rcu_read_lock(); stream->chan = channel; stream->key = stream_key; stream->trace_chunk = trace_chunk;