summaryrefslogtreecommitdiff
path: root/sys/net/pf_ioctl.c
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2011-04-19 21:58:04 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2011-04-19 21:58:04 +0000
commit5d2d98ab83e453351445badaa16c3ced78724eb5 (patch)
treea542dfd1b80655d4b7d3a5a2edcbde7904755f63 /sys/net/pf_ioctl.c
parent0544ad73028a45cf45544395f551290b96a16b43 (diff)
Fix potential null dereference.
Found by LLVM/Clang Static Analyzer. ok henning@
Diffstat (limited to 'sys/net/pf_ioctl.c')
-rw-r--r--sys/net/pf_ioctl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c
index 5d2f1ae51e2..effc6b586c4 100644
--- a/sys/net/pf_ioctl.c
+++ b/sys/net/pf_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_ioctl.c,v 1.238 2011/04/06 13:18:39 claudio Exp $ */
+/* $OpenBSD: pf_ioctl.c,v 1.239 2011/04/19 21:58:03 chl Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -814,11 +814,11 @@ pf_setup_pfsync_matching(struct pf_ruleset *rs)
if (!rs->rules.inactive.ptr_array)
return (ENOMEM);
- }
- TAILQ_FOREACH(rule, rs->rules.inactive.ptr, entries) {
- pf_hash_rule(&ctx, rule);
- (rs->rules.inactive.ptr_array)[rule->nr] = rule;
+ TAILQ_FOREACH(rule, rs->rules.inactive.ptr, entries) {
+ pf_hash_rule(&ctx, rule);
+ (rs->rules.inactive.ptr_array)[rule->nr] = rule;
+ }
}
MD5Final(digest, &ctx);