config(8): Remove all instances of an option when opting out
Quick follow-up to r342362: options can appear multiple times now, so clean up all of them as needed. For non-OPTIONS options, this has no effect since they're already de-duplicated. MFC after: 1 week X-MFC-With: r342362
This commit is contained in:
parent
2d80e14b1b
commit
1cbd030b6d
@ -479,8 +479,7 @@ rmopt_schedule(struct opt_head *list, char *name)
|
||||
{
|
||||
struct opt *op;
|
||||
|
||||
op = findopt(list, name);
|
||||
if (op != NULL) {
|
||||
while ((op = findopt(list, name)) != NULL) {
|
||||
SLIST_REMOVE(list, op, opt, op_next);
|
||||
free(op->op_name);
|
||||
free(op);
|
||||
|
Loading…
Reference in New Issue
Block a user