@@ -588,6 +588,14 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
d->__nextchar += strlen (d->__nextchar);
d->optind++;
d->optopt = 0;
+
+ while (ambig_list != NULL)
+ {
+ struct option_list *pn = ambig_list->next;
+ free (ambig_list);
+ ambig_list = pn;
+ }
return '?';
}
@@ -387,7 +387,7 @@ cmd_file_read ( char *filename, output *out, int flags)
if ((fd = open(filename, O_RDONLY)) == -1) {
die( STATE_UNKNOWN, _("Error opening %s: %s"), filename, strerror(errno) );
-
if(out)
out->lines = _cmd_fetch_output (fd, out, flags);