From 77960b7b4c6e5b03c5ef2fe897c5e00395b9ae15 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 13 Sep 2007 23:06:39 +0200 Subject: [PATCH] aac_afh.c: Fix serious memory leak. Ooops. We forgot to close the AAC decoder handle... --- aac_afh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aac_afh.c b/aac_afh.c index 9bb4323c..85bad6d9 100644 --- a/aac_afh.c +++ b/aac_afh.c @@ -100,7 +100,7 @@ static int aac_get_file_info(char *map, size_t numbytes, unsigned long rate = 0, decoder_len; unsigned char channels = 0; mp4AudioSpecificConfig mp4ASC; - NeAACDecHandle handle; + NeAACDecHandle handle = NULL; unsigned char *umap = (unsigned char *) map; ret = aac_find_esds(umap, numbytes, &skip, &decoder_len); @@ -146,6 +146,8 @@ static int aac_get_file_info(char *map, size_t numbytes, tv_scale(20, &afi->chunk_tv, &afi->eof_tv); ret = 1; out: + if (handle) + NeAACDecClose(handle); return ret; } -- 2.39.5