diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-13 04:37:47 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-13 04:37:47 +0400 |
commit | e47024d72f326f7a76c9df90da861663fc5d5fc2 (patch) | |
tree | a0a6e9483f817272ae8a41e2c6596f76015a0084 /libavformat | |
parent | 120b38b966b92a50dd36542190d35daba6730eb3 (diff) |
wtvdec: fix memleak on error
Fixes CID718002
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/wtvdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c index 319b986ab4..a8dc506e84 100644 --- a/libavformat/wtvdec.c +++ b/libavformat/wtvdec.c @@ -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; } |