barcode/barcode-0.98-free.patch

28 lines
837 B
Diff

diff -pur barcode-0.98/plessey.c barcode-0.98-fix/plessey.c
--- barcode-0.98/plessey.c 2005-10-11 08:03:17.000000000 +0000
+++ barcode-0.98-fix/plessey.c 2005-10-11 07:58:33.000000000 +0000
@@ -112,6 +112,7 @@ int Barcode_pls_encode(struct Barcode_It
if (!textinfo) {
bc->error = errno;
free(partial);
+ free(checkptr);
return -1;
}
@@ -126,6 +127,7 @@ int Barcode_pls_encode(struct Barcode_It
bc->error = EINVAL; /* impossible if text is verified */
free(partial);
free(textinfo);
+ free(checkptr);
return -1;
}
code = c - alphabet;
@@ -159,6 +161,7 @@ int Barcode_pls_encode(struct Barcode_It
strcpy(ptr, fillers[1]);
bc->partial = partial;
bc->textinfo = textinfo;
+ free(checkptr);
return 0;
}