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

@ -555,13 +555,15 @@ int png_plot(struct zint_symbol *symbol, int rotate_angle)
latch = 0;
r = 0;
/* Isolate add-on text */
for(i = 0; i < ustrlen(local_text); i++) {
if (latch == 1) {
addon[r] = local_text[i];
r++;
}
if (symbol->text[i] == '+') {
latch = 1;
if(is_extendable(symbol->symbology)) {
for(i = 0; i < ustrlen(local_text); i++) {
if (latch == 1) {
addon[r] = local_text[i];
r++;
}
if (symbol->text[i] == '+') {
latch = 1;
}
}
}
addon[r] = '\0';