mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-09 13:41:59 -04: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
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue