From 9c9d3354001b1de74bb5ff5839ceea86bf3d1c94 Mon Sep 17 00:00:00 2001 From: Lionel Nicolas Date: Thu, 10 Jun 2021 03:04:43 -0400 Subject: [PATCH] Fix streaming plugin mutex unlock when disabling mountpoint (#2690) --- plugins/janus_streaming.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/janus_streaming.c b/plugins/janus_streaming.c index a808d2312e..45b0ac89bd 100644 --- a/plugins/janus_streaming.c +++ b/plugins/janus_streaming.c @@ -4174,8 +4174,11 @@ static json_t *janus_streaming_process_synchronous_request(janus_streaming_sessi JANUS_VALIDATE_JSON_OBJECT(root, disable_parameters, error_code, error_cause, TRUE, JANUS_STREAMING_ERROR_MISSING_ELEMENT, JANUS_STREAMING_ERROR_INVALID_ELEMENT); - if(error_code != 0) + if(error_code != 0) { + janus_refcount_decrease(&mp->ref); + janus_mutex_unlock(&mountpoints_mutex); goto prepare_response; + } mp->enabled = FALSE; gboolean stop_recording = TRUE; json_t *stop_rec = json_object_get(root, "stop_recording");