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

Rémi Duraffort git at videolan.org
Sat Jul 13 10:19:46 CEST 2013


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Jul 13 10:13:18 2013 +0200| [c6c15ffb8646b4a5da602847d38f30b5f44e6e05] | committer: Rémi Duraffort

Fix potential missing unlock (cid #1047153)

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

 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