mirror of https://git.ffmpeg.org/ffmpeg.git
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)
|
if (!wst)
|
||||||
return NULL;
|
return NULL;
|
||||||
st = avformat_new_stream(s, NULL);
|
st = avformat_new_stream(s, NULL);
|
||||||
if (!st)
|
if (!st) {
|
||||||
|
av_free(wst);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
st->id = sid;
|
st->id = sid;
|
||||||
st->priv_data = wst;
|
st->priv_data = wst;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue