[NETFILTER]: arp_tables: fix NULL pointer dereference

The check is wrong and lets NULL-ptrs slip through since !IS_ERR(NULL)
is true.

Coverity #190

Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>

---
commit cbb18ea472603ef2e7fcc0dd21490c22a9c01335
tree 3efd50ffde8d6390a9302c4a79fcdf241a88e055
parent 4f58fff161d4c5f79955fe6ad2f98752282c9d6b
author Patrick McHardy <[EMAIL PROTECTED]> Mon, 13 Mar 2006 00:09:20 +0100
committer Patrick McHardy <[EMAIL PROTECTED]> Mon, 13 Mar 2006 00:09:20 +0100

 net/ipv4/netfilter/arp_tables.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index dd1048b..7d7ab94 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -771,7 +771,7 @@ static int get_entries(const struct arpt
        struct arpt_table *t;
 
        t = xt_find_table_lock(NF_ARP, entries->name);
-       if (t || !IS_ERR(t)) {
+       if (t && !IS_ERR(t)) {
                struct xt_table_info *private = t->private;
                duprintf("t->private->number = %u\n",
                         private->number);
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to