Fix memleak for currupt input.
authorCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>
Wed, 1 Oct 2008 21:47:49 +0000 (21:47 +0000)
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>
Wed, 1 Oct 2008 21:47:49 +0000 (21:47 +0000)
Originally committed as revision 15507 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/vorbis_dec.c

index 9fc619b..6c15cb8 100644 (file)
@@ -960,6 +960,7 @@ static av_cold int vorbis_decode_init(AVCodecContext *avccontext) {
     hdr_type=get_bits(gb, 8);
     if (hdr_type!=5) {
         av_log(avccontext, AV_LOG_ERROR, "Third header is not the setup header.\n");
+        vorbis_free(vc);
         return -1;
     }
     if (vorbis_parse_setup_hdr(vc)) {