diff options
author | Charles Longeau <chl@cvs.openbsd.org> | 2011-04-19 21:58:04 +0000 |
---|---|---|
committer | Charles Longeau <chl@cvs.openbsd.org> | 2011-04-19 21:58:04 +0000 |
commit | 5d2d98ab83e453351445badaa16c3ced78724eb5 (patch) | |
tree | a542dfd1b80655d4b7d3a5a2edcbde7904755f63 /sys/net/pf_ioctl.c | |
parent | 0544ad73028a45cf45544395f551290b96a16b43 (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.c | 10 |
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); |