avcodec/extract_extradata_bsf: Fix leak discovered via fuzzing
authorNikolas Bowe <nbowe-at-google.com@ffmpeg.org>
Tue, 5 Dec 2017 23:11:26 +0000 (15:11 -0800)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 3 Oct 2018 19:03:31 +0000 (21:03 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/extract_extradata_bsf.c

index 100c60d..10d1080 100644 (file)
@@ -78,7 +78,7 @@ static int extract_extradata_h2645(AVBSFContext *ctx, AVPacket *pkt,
     ret = ff_h2645_packet_split(&h2645_pkt, pkt->data, pkt->size,
                                 ctx, 0, 0, ctx->par_in->codec_id);
     if (ret < 0)
-        return ret;
+        goto fail;
 
     for (i = 0; i < h2645_pkt.nb_nals; i++) {
         H2645NAL *nal = &h2645_pkt.nals[i];