Fix: relayd: missing session unlock on error path
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 16 Mar 2022 14:48:59 +0000 (10:48 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 16 Mar 2022 14:48:59 +0000 (10:48 -0400)
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 <jeremie.galarneau@efficios.com>
Change-Id: I66de344f5f39ac85bf8db93cf39a07d0c6cf7694

src/bin/lttng-relayd/live.cpp

index 3efa1beda7d27a0fac613debbbc789c95d80860c..5aa899b282605a0c058f7f497f9b500ad7e0226b 100644 (file)
@@ -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);
This page took 0.027385 seconds and 5 git commands to generate.