comparison vorbis_dec.c @ 7973:fb9a51e5d116 libavcodec

Fix memleak for currupt input.
author cehoyos
date Wed, 01 Oct 2008 21:47:49 +0000
parents c0745c5b1bb4
children ddecbc18fe94
comparison
equal deleted inserted replaced
7972:6cf217dad67d 7973:fb9a51e5d116
958 958
959 init_get_bits(gb, header_start[2], header_len[2]*8); 959 init_get_bits(gb, header_start[2], header_len[2]*8);
960 hdr_type=get_bits(gb, 8); 960 hdr_type=get_bits(gb, 8);
961 if (hdr_type!=5) { 961 if (hdr_type!=5) {
962 av_log(avccontext, AV_LOG_ERROR, "Third header is not the setup header.\n"); 962 av_log(avccontext, AV_LOG_ERROR, "Third header is not the setup header.\n");
963 vorbis_free(vc);
963 return -1; 964 return -1;
964 } 965 }
965 if (vorbis_parse_setup_hdr(vc)) { 966 if (vorbis_parse_setup_hdr(vc)) {
966 av_log(avccontext, AV_LOG_ERROR, "Setup header corrupt.\n"); 967 av_log(avccontext, AV_LOG_ERROR, "Setup header corrupt.\n");
967 vorbis_free(vc); 968 vorbis_free(vc);