File barcode-0.98-leak-fix.patch of Package barcode
--- cmdline.c.old 2000-05-08 22:52:36.000000000 +0200
+++ cmdline.c 2009-09-17 10:55:51.000000000 +0200
@@ -156,6 +156,7 @@
*/
if (retval == -1)
commandline_errormsg(stderr, args, argv[0], errorhead);
+ free(getopt_desc);
return retval;
}
}
@@ -165,13 +166,18 @@
for (ptr = args; ptr->option; ptr++)
if (opt == ptr->option)
break;
- if (!ptr->option) /* unknown option */
+ if (!ptr->option){ /* unknown option */
+ free(getopt_desc);
return commandline_errormsg(stderr, args, argv[0], errorhead);
+ }
if ( (retval = commandline_oneopt(ptr, optarg)) ) { /* wrong arg */
if (retval == -1)
commandline_errormsg(stderr, args, argv[0], errorhead);
+ free(getopt_desc);
return retval;
}
}
+
+ free(getopt_desc);
return 0;
}