]> err.no Git - linux-2.6/commitdiff
[NETFILTER]: x_tables: small check_entry & module_refcount cleanup
authorDmitry Mishin <dim@openvz.org>
Wed, 20 Sep 2006 19:00:21 +0000 (12:00 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 22 Sep 2006 22:19:51 +0000 (15:19 -0700)
While standard_target has target->me == NULL, module_put() should be
called for it as for others, because there were try_module_get() before.

Signed-off-by: Dmitry Mishin <dim@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c

index aaeaa9ce0f28d1f6f5c94b3749d97945561867e9..85f0d73ebfb4cd19fccfea105819b95dcf7e42f0 100644 (file)
@@ -485,7 +485,7 @@ static inline int check_entry(struct arpt_entry *e, const char *name, unsigned i
        if (t->u.kernel.target == &arpt_standard_target) {
                if (!standard_check(t, size)) {
                        ret = -EINVAL;
-                       goto out;
+                       goto err;
                }
        } else if (t->u.kernel.target->checkentry
                   && !t->u.kernel.target->checkentry(name, e, target, t->data,
index a0f36806998c59011ed84feaf458070aa279973c..38e1e4fba0db0949d25f3b001b0a0bda5b750f81 100644 (file)
@@ -573,7 +573,7 @@ check_entry(struct ipt_entry *e, const char *name, unsigned int size,
        if (t->u.kernel.target == &ipt_standard_target) {
                if (!standard_check(t, size)) {
                        ret = -EINVAL;
-                       goto cleanup_matches;
+                       goto err;
                }
        } else if (t->u.kernel.target->checkentry
                   && !t->u.kernel.target->checkentry(name, e, target, t->data,
index 73d477ce216b32a98cfd30b86beaba6e53169487..4ab368fa0b8f09af141bf04cfda02849ea82a19d 100644 (file)
@@ -610,7 +610,7 @@ check_entry(struct ip6t_entry *e, const char *name, unsigned int size,
        if (t->u.kernel.target == &ip6t_standard_target) {
                if (!standard_check(t, size)) {
                        ret = -EINVAL;
-                       goto cleanup_matches;
+                       goto err;
                }
        } else if (t->u.kernel.target->checkentry
                   && !t->u.kernel.target->checkentry(name, e, target, t->data,