mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Free memory when quitting Aztec (#181)
Malloc'd memory should be freed as identified by Nico Gunkel in #181
This commit is contained in:
parent
0c00ece9f5
commit
f82dd73dd7
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user