avformat/swfdec: Fix memleak on error

Fixes: 9eb9cf5b8c26dd0fa7107ed0348dcc1f/signal_sigabrt_7ffff6ae7c37_8925_1f676b5229d009f2b56dfd9e149fa6ba.swf

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-08-22 01:01:44 +02:00
parent 1ae4b1e09d
commit d7633ed7a5
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}