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:
parent
120b38b966
commit
e47024d72f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user