From f82dd73dd715ac3155d0ab4b41f814275c2b4369 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Sat, 28 Mar 2020 12:12:46 +0000 Subject: [PATCH] Free memory when quitting Aztec (#181) Malloc'd memory should be freed as identified by Nico Gunkel in #181 --- backend/aztec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/aztec.c b/backend/aztec.c index decd57ec..c17c1e3f 100644 --- a/backend/aztec.c +++ b/backend/aztec.c @@ -721,6 +721,9 @@ static int aztec_text_process(const unsigned char source[], const size_t src_len for (count = 0; ((i + count) < reduced_length) && (reduced_encode_mode[i + count] == 'B'); count++); if (count > 2079) { + free(encode_mode); + free(reduced_source); + free(reduced_encode_mode); return ZINT_ERROR_TOO_LONG; }