From 88306b2b7c0909f656e81c8b5947c3ed58e2b5c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= Date: Tue, 10 Nov 2020 16:39:38 +0100 Subject: [PATCH] input: Fix missing mutex unlock on error path --- src/input/input.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/input/input.c b/src/input/input.c index e6a1e4a874..06b18e2f5c 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -3474,7 +3474,10 @@ int input_GetAttachments(input_thread_t *input, *attachments = vlc_alloc(attachments_count, sizeof(input_attachment_t*)); if (!*attachments) + { + vlc_mutex_unlock(&priv->p_item->lock); return -1; + } for (int i = 0; i < attachments_count; i++) (*attachments)[i] = vlc_input_attachment_Hold(priv->attachment[i]);