[vlc-commits] Fix potential missing unlock (cid #1047153)

Rémi Duraffort git at videolan.org
Sat Jul 13 15:31:26 CEST 2013


vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Jul 13 10:13:18 2013 +0200| [238adec5b3d5574cb517df1e9ba4a87a6007e96d] | committer: Jean-Baptiste Kempf

Fix potential missing unlock (cid #1047153)

(cherry picked from commit c6c15ffb8646b4a5da602847d38f30b5f44e6e05)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=238adec5b3d5574cb517df1e9ba4a87a6007e96d
---

 modules/stream_filter/httplive.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index fa0c490..b1898d1 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -2313,7 +2313,10 @@ static int Peek(stream_t *s, const uint8_t **pp_peek, unsigned int i_peek)
         else if (peeked->i_buffer < i_peek)
             peeked = block_Realloc (peeked, 0, i_peek);
         if (peeked == NULL)
+        {
+            vlc_mutex_unlock(&segment->lock);
             return 0;
+        }
         p_sys->peeked = peeked;
 
         memcpy(peeked->p_buffer, p_buff, i_buff);



More information about the vlc-commits mailing list