git.videolan.org
/
ffmpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
wtv: clean memory on error
[ffmpeg.git]
/
libavformat
/
wtv.c
diff --git
a/libavformat/wtv.c
b/libavformat/wtv.c
index
a3f8c27
..
ce0122d
100644
(file)
--- 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;
}