From ca804c3cdb7a9673c9d8d166a3646c2bc295bb11 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 3 Oct 2010 12:43:00 +0200 Subject: [PATCH 1/1] afh: Fix a memory leak in stream mode. We need to free the audio format handler info in both info and stream mode. --- afh.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/afh.c b/afh.c index 5ce6cfc5..b5fb65fc 100644 --- a/afh.c +++ b/afh.c @@ -192,15 +192,15 @@ int main(int argc, char **argv) print_info(audio_format_num, &afhi); if (conf.chunk_table_given) print_chunk_table(&afhi); - free(afhi.techinfo); - free(afhi.tags.artist); - free(afhi.tags.title); - free(afhi.tags.year); - free(afhi.tags.album); - free(afhi.tags.comment); - free(afhi.chunk_table); printf("\n"); } + free(afhi.techinfo); + free(afhi.tags.artist); + free(afhi.tags.title); + free(afhi.tags.year); + free(afhi.tags.album); + free(afhi.tags.comment); + free(afhi.chunk_table); ret2 = para_munmap(audio_file_data, audio_file_size); if (ret2 < 0 && ret >= 0) ret = ret2; -- 2.39.2