aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-13 02:37:47 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-25 21:12:41 +0200
commitc09b4dde377625d7f8a06caff71ff7120bad8f36 (patch)
treed77360a684f0e8f3e12db9d041525dbbc923b5b7
parentdb4903f4e4b553b72059ed407b012aca6769b8ea (diff)
downloadffmpeg-c09b4dde377625d7f8a06caff71ff7120bad8f36.tar.gz
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>
-rw-r--r--libavformat/wtvdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index db9bb10068..06050337fc 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -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;
}