Correct some memory leaks found by MSVC

This commit is contained in:
hooper114 2009-06-18 10:20:23 +00:00
parent 6c631bf282
commit 18b986156f
10 changed files with 60 additions and 35 deletions

View file

@ -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';