1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

wtvdec: fix memleak on error

Fixes CID718002
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-13 02:37:47 +02:00
parent 120b38b966
commit e47024d72f

View File

@ -580,8 +580,10 @@ static AVStream * new_stream(AVFormatContext *s, AVStream *st, int sid, int code
if (!wst)
return NULL;
st = avformat_new_stream(s, NULL);
if (!st)
if (!st) {
av_free(wst);
return NULL;
}
st->id = sid;
st->priv_data = wst;
}