+ /*
+ * At this point, two references to the published chunks exist. One
+ * is taken by the registry while the other is being returned to the
+ * caller. In the use case of the relay daemon, the reference held
+ * by the registry itself is undesirable.
+ *
+ * We want the trace chunk to be removed from the registry as soon
+ * as it is not being used by the relay daemon (through a session
+ * or a stream). This differs from the behaviour of the consumer
+ * daemon which relies on an explicit command from the session
+ * daemon to release the registry's reference.
+ */
+ lttng_trace_chunk_put(published_chunk);