From 97d32c86d12af1b3df859271d972b055920fe677 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 12 Jul 2022 08:18:20 -0400 Subject: [PATCH] TT#14008 fix possible AMR decoder mem leak closes #1512 Change-Id: I7cd5605adbcc340b5e73d7d3daf5f8f70d8b6931 (cherry picked from commit e683b813e5bb01edcff0dac7d84ee2b648daff9c) --- lib/codeclib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/codeclib.c b/lib/codeclib.c index a777a22a9..af519d7ab 100644 --- a/lib/codeclib.c +++ b/lib/codeclib.c @@ -2007,6 +2007,7 @@ static void amr_bitrate_tracker(decoder_t *dec, unsigned int ft) { } static int amr_decoder_input(decoder_t *dec, const str *data, GQueue *out) { const char *err = NULL; + AUTO_CLEANUP(GQueue toc, g_queue_clear) = G_QUEUE_INIT; if (!data || !data->s) goto err; @@ -2014,7 +2015,6 @@ static int amr_decoder_input(decoder_t *dec, const str *data, GQueue *out) { bitstr d; bitstr_init(&d, data); - GQueue toc = G_QUEUE_INIT; unsigned int ill = 0, ilp = 0; unsigned char cmr_chr[2];