mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-10-31 12:36:41 +08:00 
			
		
		
		
	avcodec/vorbisdec: Fix memleak, call cleanup on memory allocation failure
Fixes CID1258478, CID1258476, CID1258475 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		| @@ -383,8 +383,10 @@ static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc) | ||||
|                 codebook_setup->codevectors = | ||||
|                     av_mallocz_array(used_entries, codebook_setup->dimensions * | ||||
|                                sizeof(*codebook_setup->codevectors)); | ||||
|                 if (!codebook_setup->codevectors) | ||||
|                     return AVERROR(ENOMEM); | ||||
|                 if (!codebook_setup->codevectors) { | ||||
|                     ret = AVERROR(ENOMEM); | ||||
|                     goto error; | ||||
|                 } | ||||
|             } else | ||||
|                 codebook_setup->codevectors = NULL; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Michael Niedermayer
					Michael Niedermayer