Some error paths in relay_close_trace_chunk() skip the unlock
of the relay_session's lock.
412203 Missing unlock
May result in deadlock if there is another attempt to acquire the
lock.
In relay_close_trace_chunk: Missing a release of a lock on a
path (CWE-667)
Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I43187959abf00e761f7a255f4af7cd53e0c451fb
new_path);
if (chunk_status != LTTNG_TRACE_CHUNK_STATUS_OK) {
ret = -1;
- goto end;
+ goto end_unlock_session;
}
session->ongoing_rotation = false;
}
chunk_status = lttng_trace_chunk_rename_path(chunk, old_path);
if (chunk_status != LTTNG_TRACE_CHUNK_STATUS_OK) {
ret = -1;
- goto end;
+ goto end_unlock_session;
}
}
chunk_status = lttng_trace_chunk_set_close_timestamp(