Fix: release reference to new chunk on copy error
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 20 Sep 2019 14:47:30 +0000 (10:47 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 20 Sep 2019 21:07:27 +0000 (17:07 -0400)
Fixes coverity #1405775

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/trace-chunk.c

index 6770bd982db393a45bdfda698614a1af2b4a6b54..601d402e0843639ac9457269b4916d2ace8dce29 100644 (file)
@@ -367,6 +367,7 @@ end:
        return new_chunk;
 error_unlock:
        pthread_mutex_unlock(&source_chunk->lock);
+       lttng_trace_chunk_put(new_chunk);
        return NULL;
 }
 
This page took 0.026311 seconds and 4 git commands to generate.