From: Jonathan Rajotte Date: Fri, 20 Sep 2019 14:47:30 +0000 (-0400) Subject: Fix: release reference to new chunk on copy error X-Git-Tag: v2.11.0-rc4~15 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3136b297a0fae6e87fe4e28cdbde7efd86080135;p=lttng-tools.git Fix: release reference to new chunk on copy error Fixes coverity #1405775 Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/trace-chunk.c b/src/common/trace-chunk.c index 6770bd982..601d402e0 100644 --- a/src/common/trace-chunk.c +++ b/src/common/trace-chunk.c @@ -367,6 +367,7 @@ end: return new_chunk; error_unlock: pthread_mutex_unlock(&source_chunk->lock); + lttng_trace_chunk_put(new_chunk); return NULL; }