* lib/getopt.c (_getopt_internal_r): The previous commit broke
out the loop too early, which could give a false indication
of ambiguous options under memory exhaustion.
pfound = p;
indfound = option_index;
}
+ else if (ambig)
+ ; /* Taking simpler path to handling ambiguities. */
else if (long_only
|| pfound->has_arg != p->has_arg
|| pfound->flag != p->flag
struct option_list *newp = malloc (sizeof (*newp));
if (newp == NULL)
{
- ambig = 1; /* Use simpler fallback message. */
free_option_list (ambig_list);
ambig_list = NULL;
- break;
+ ambig = 1; /* Use simpler fallback message. */
}
else
#endif