FOREACH macro is not safe to use when removing elements on a list.
FOREACH macro is not safe to use when removing elements on a list.

Should fix a NULL dereference reported by guenther@.

ok dlg@

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars