Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
new_stream->chan = channel;
new_stream->wait_fd = fd;
+ /* Metadata chan refcount is increment in add_metadata_stream */
+ if (new_stream->chan->type != CONSUMER_CHANNEL_TYPE_METADATA) {
+ /* Update channel refcount */
+ uatomic_inc(&new_stream->chan->refcount);
+ }
+
/*
* The buffer flush is done on the session daemon side for the kernel
* so no need for the stream "hangup_flush_done" variable to be