viewer_stream_create() should not release (put) the reference to
the viewer_trace_chunk in its error path if it could not acquire
a new reference in the first place.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
if (vstream) {
viewer_stream_destroy(vstream);
}
if (vstream) {
viewer_stream_destroy(vstream);
}
- if (viewer_trace_chunk) {
+ if (viewer_trace_chunk && acquired_reference) {
lttng_trace_chunk_put(viewer_trace_chunk);
}
return NULL;
lttng_trace_chunk_put(viewer_trace_chunk);
}
return NULL;