[vlc-devel] [V2 10/16] input: Fix missing mutex unlock on error path
    Hugo Beauzée-Luyssen 
    hugo at beauzee.fr
       
    Fri Nov 13 11:27:26 CET 2020
    
    
  
---
 src/input/input.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/src/input/input.c b/src/input/input.c
index 47ddb5c72d..df315cf010 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -3467,7 +3467,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->p_item->attachment[i]);
-- 
2.29.2
    
    
More information about the vlc-devel
mailing list