summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-10-18 01:12:18 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-10-20 10:38:38 +0100
commit7b48bf95242ebf95366d24d32e4cfca6aa77c5e2 (patch)
tree3663d6113d2a92ebdf748a1013ffedbb451bbf02 /libavformat
parent9fbc613f0df1628e7e78bca791fa8833846f8210 (diff)
downloadffmpeg-streaming-7b48bf95242ebf95366d24d32e4cfca6aa77c5e2.zip
ffmpeg-streaming-7b48bf95242ebf95366d24d32e4cfca6aa77c5e2.tar.gz
wtv: clean memory on error
CC: libav-stable@libav.org Bug-Id: CID 718002
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/wtv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index a3f8c27..ce0122d 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -632,8 +632,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;
}
OpenPOWER on IntegriCloud