[FFmpeg-cvslog] wtv: clean memory on error
Vittorio Giovara
git at videolan.org
Mon Oct 20 21:59:14 CEST 2014
ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Sat Oct 18 01:12:18 2014 +0100| [7b48bf95242ebf95366d24d32e4cfca6aa77c5e2] | committer: Vittorio Giovara
wtv: clean memory on error
CC: libav-stable at libav.org
Bug-Id: CID 718002
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b48bf95242ebf95366d24d32e4cfca6aa77c5e2
---
libavformat/wtv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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;
}
More information about the ffmpeg-cvslog
mailing list