summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/net/pf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 77176009854..cf28dbffe18 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.683 2010/01/12 03:20:51 mcbride Exp $ */
+/* $OpenBSD: pf.c,v 1.684 2010/01/13 23:45:14 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -788,6 +788,9 @@ pf_state_key_detach(struct pf_state *s, int idx)
{
struct pf_state_item *si;
+ if (&s->key[idx] == NULL)
+ return;
+
si = TAILQ_FIRST(&s->key[idx]->states);
while (si && si->s != s)
si = TAILQ_NEXT(si, entry);