Free memory when quitting Aztec (#181)

Malloc'd memory should be freed as identified by Nico Gunkel in #181
This commit is contained in:
Robin Stuart 2020-03-28 12:12:46 +00:00
parent 0c00ece9f5
commit f82dd73dd7

View File

@ -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++); for (count = 0; ((i + count) < reduced_length) && (reduced_encode_mode[i + count] == 'B'); count++);
if (count > 2079) { if (count > 2079) {
free(encode_mode);
free(reduced_source);
free(reduced_encode_mode);
return ZINT_ERROR_TOO_LONG; return ZINT_ERROR_TOO_LONG;
} }