From: Jérémie Galarneau Date: Wed, 16 Mar 2022 14:48:59 +0000 (-0400) Subject: Fix: relayd: missing session unlock on error path X-Git-Tag: v2.12.9~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=94814ee3f61dccf03001535eeaff10670b47e63b;p=lttng-tools.git Fix: relayd: missing session unlock on error path 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 --- diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c index 2c7b00f8a..2e1266de6 100644 --- a/src/bin/lttng-relayd/live.c +++ b/src/bin/lttng-relayd/live.c @@ -1185,7 +1185,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);