]> git.sesse.net Git - vlc/commitdiff
vpx: fix leak
authorTristan Matthews <tmatth@videolan.org>
Sun, 22 Mar 2015 22:01:26 +0000 (18:01 -0400)
committerTristan Matthews <tmatth@videolan.org>
Sun, 22 Mar 2015 22:01:26 +0000 (18:01 -0400)
modules/codec/vpx.c

index ac7d8d71569a5336fd4a2aa089dbe43d0da38218..1707e72db7dbb12f6d7f5057d2d223c08e6c279f 100644 (file)
@@ -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;