wtvdec: fix memleak on error
Fixes CID718002 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit e47024d72f326f7a76c9df90da861663fc5d5fc2) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
db4903f4e4
commit
c09b4dde37
@ -565,8 +565,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…
x
Reference in New Issue
Block a user