[vlc-commits] vpx: fix leak

Tristan Matthews git at videolan.org
Sun Mar 22 23:03:11 CET 2015


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Sun Mar 22 18:01:26 2015 -0400| [3682cdd28fed93c43d36116ae443fb50224d27cf] | committer: Tristan Matthews

vpx: fix leak

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

 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 ac7d8d7..1707e72 100644
--- a/modules/codec/vpx.c
+++ b/modules/codec/vpx.c
@@ -103,8 +103,10 @@ static picture_t *Decode(decoder_t *dec, block_t **pp_block)
 
     const void *iter = NULL;
     struct vpx_image *img = vpx_codec_get_frame(ctx, &iter);
-    if (!img)
+    if (!img) {
+        free(pkt_pts);
         return NULL;
+    }
 
     /* fetches back the PTS */
     pkt_pts = img->user_priv;



More information about the vlc-commits mailing list