[vlc-commits] codec/vpx.c: do not leak memory.

Jean-Paul Saman git at videolan.org
Tue Oct 13 07:21:00 CEST 2015


vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Sun Sep 20 12:52:37 2015 +0200| [2b57b9effaf49a4ab965eecece5c902f718d5cf1] | committer: Ilkka Ollakka

codec/vpx.c: do not leak memory.

Signed-off-by: Ilkka Ollakka <ileoo at videolan.org>

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

 modules/codec/vpx.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c
index 478c34b..90180b8 100644
--- a/modules/codec/vpx.c
+++ b/modules/codec/vpx.c
@@ -72,8 +72,10 @@ static picture_t *Decode(decoder_t *dec, block_t **pp_block)
     if (!block)
         return NULL;
 
-    if (block->i_flags & (BLOCK_FLAG_CORRUPTED))
+    if (block->i_flags & (BLOCK_FLAG_CORRUPTED)) {
+        block_Release(block);
         return NULL;
+    }
 
     /* Associate packet PTS with decoded frame */
     mtime_t *pkt_pts = malloc(sizeof(*pkt_pts));



More information about the vlc-commits mailing list