From 0283afa961253376a5e18de140d29fffd9e89ae3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 16 Mar 2022 10:48:59 -0400 Subject: [PATCH] Fix: relayd: missing session unlock on error path MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 1475890 Missing unlock May result in deadlock if there is another attempt to acquire the lock. In viewer_get_new_streams(relay_connection *): Missing a release of a lock on a path (CWE-667) Reported-by: Coverity Scan Signed-off-by: Jérémie Galarneau Change-Id: I66de344f5f39ac85bf8db93cf39a07d0c6cf7694 --- src/bin/lttng-relayd/live.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng-relayd/live.cpp b/src/bin/lttng-relayd/live.cpp index 3efa1beda..5aa899b28 100644 --- a/src/bin/lttng-relayd/live.cpp +++ b/src/bin/lttng-relayd/live.cpp @@ -1271,7 +1271,7 @@ int viewer_get_new_streams(struct relay_connection *conn) * 'ret' to close the connection. */ response.status = htobe32(LTTNG_VIEWER_NEW_STREAMS_ERR); - goto send_reply; + goto send_reply_unlock; } send_streams = 1; response.status = htobe32(LTTNG_VIEWER_NEW_STREAMS_OK); -- 2.34.1