mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-24 12:07:00 -04:00
Correct some memory leaks found by MSVC
This commit is contained in:
parent
6c631bf282
commit
18b986156f
10 changed files with 60 additions and 35 deletions
16
backend/ps.c
16
backend/ps.c
|
@ -154,13 +154,15 @@ int ps_plot(struct zint_symbol *symbol)
|
|||
latch = 0;
|
||||
r = 0;
|
||||
/* Isolate add-on text */
|
||||
for(i = 0; i < ustrlen(symbol->text); i++) {
|
||||
if (latch == 1) {
|
||||
addon[r] = symbol->text[i];
|
||||
r++;
|
||||
}
|
||||
if (symbol->text[i] == '+') {
|
||||
latch = 1;
|
||||
if(is_extendable(symbol->symbology)) {
|
||||
for(i = 0; i < ustrlen(symbol->text); i++) {
|
||||
if (latch == 1) {
|
||||
addon[r] = symbol->text[i];
|
||||
r++;
|
||||
}
|
||||
if (symbol->text[i] == '+') {
|
||||
latch = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
addon[r] = '\0';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue