If opt->values is not NULL, no string value is stored on the heap,
and the current code results is a segmentation fault.
}
switch (opt->arg_type) {
case LLS_STRING:
}
switch (opt->arg_type) {
case LLS_STRING:
- if (lor->given > 0 && !multiple)
+ if (!opt->values && lor->given > 0 && !multiple)
free(lor->value[idx].string_val);
if (opt->values) {
ret = check_enum_arg(la->arg, opt, errctx);
free(lor->value[idx].string_val);
if (opt->values) {
ret = check_enum_arg(la->arg, opt, errctx);