$OpenBSD: patch-mod_c,v 1.1 2010/04/30 13:44:15 naddy Exp $ --- mod.c.orig Fri Apr 30 15:27:00 2010 +++ mod.c Fri Apr 30 15:27:11 2010 @@ -151,7 +151,7 @@ mod_close(void) { struct rule *rule; - TAILQ_FOREACH_REVERSE(rule, &rules, next, head) { + TAILQ_FOREACH_REVERSE(rule, &rules, head, next) { if (rule->mod->close != NULL) rule->data = rule->mod->close(rule->data); TAILQ_REMOVE(&rules, rule, next);