From: Vittorio Giovara Date: Sat, 18 Oct 2014 00:12:18 +0000 (+0100) Subject: wtv: clean memory on error X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=7b48bf95242ebf95366d24d32e4cfca6aa77c5e2;p=ffmpeg wtv: clean memory on error CC: libav-stable@libav.org Bug-Id: CID 718002 --- diff --git a/libavformat/wtv.c b/libavformat/wtv.c index a3f8c273885..ce0122dc1c9 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; }