Browse Source

wtvdec: fix memleak on error

Fixes CID718002
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 12 years ago
parent
commit
e47024d72f
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavformat/wtvdec.c

+ 3
- 1
libavformat/wtvdec.c View File

@@ -580,8 +580,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;
}


Loading…
Cancel
Save