Fix: consumerd: double unlock on rotate channel error path
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 21 Jul 2020 16:44:59 +0000 (12:44 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 21 Jul 2020 17:01:41 +0000 (13:01 -0400)
commit5e285896c2e871e202463691b9d55f2e59d837b2
tree8585f7145d99a48eb62cd586e823ea935ddb5f4e
parente537f276fd9688b701f52b8e5da438ee6aea4306
Fix: consumerd: double unlock on rotate channel error path

Coverity Scan reports:
  1430541 Double unlock

  May result in undefined behavior.

  In lttng_consumer_rotate_channel: Attempt to release a non-recursive
  lock that is not held (CWE-765)

The error path should jump to end_unlock_channel as the stream
lock is only held for the duration of the call to
consumer_stream_open_packet.

This bug was introduced by the previous commit.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I2de684eece963973d0861e5924263575363484f6
src/common/consumer/consumer.c
This page took 0.025901 seconds and 4 git commands to generate.