diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c index 20f1568e6f..3268c0aa37 100644 --- a/libavformat/swfdec.c +++ b/libavformat/swfdec.c @@ -397,6 +397,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) if (linesize * height > pkt->size) { res = AVERROR_INVALIDDATA; + av_packet_unref(pkt); goto bitmap_end; }