[vlc-commits] bluray: Fix a memory leak introduced in previous commit.

Hugo Beauzée-Luyssen git at videolan.org
Sat Mar 10 15:58:49 CET 2012


vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sat Mar 10 15:58:10 2012 +0100| [96b0289176abe5a24eb1f854e74654b3c55d0574] | committer: Hugo Beauzée-Luyssen

bluray: Fix a memory leak introduced in previous commit.

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

 modules/access/bluray.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 67d0f5c..5c33b10 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1001,7 +1001,10 @@ static int blurayDemux(demux_t *p_demux)
         nread = bd_read_ext(p_sys->bluray, p_block->p_buffer,
                             NB_TS_PACKETS * BD_TS_PACKET_SIZE, &e);
         if (nread < 0)
+        {
+            block_Release(p_block);
             return -1;
+        }
         if (nread == 0) {
             if (e.event == BD_EVENT_NONE)
                 msg_Info(p_demux, "We reached the end of a title");



More information about the vlc-commits mailing list