meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.25k stars 2.48k forks source link

janus_streaming: unlock before decref of mounpoint #3145

Closed tmatth closed 1 year ago

tmatth commented 1 year ago

The mutex should not be held while decrementing the reference count. In the unlikely event that the refcount were 0, janus_streaming_mountpoint_free would deadlock trying to acquire this same mutex.

This is again unlikely since the reference count is incremented right before and so presumably is never 0 here.

tmatth commented 1 year ago

This addresses the issue discussed here https://github.com/meetecho/janus-gateway/issues/3108#issuecomment-1377419887

lminiero commented 1 year ago

Ack, thanks, merging!