OSDN Git Service

[NETFILTER]: ctnetlink: fix reference count leak
authorPatrick McHardy <kaber@trash.net>
Mon, 27 Nov 2006 18:26:25 +0000 (10:26 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 29 Nov 2006 04:59:36 +0000 (20:59 -0800)
When NFA_NEST exceeds the skb size the protocol reference is leaked.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/ip_conntrack_netlink.c
net/netfilter/nf_conntrack_netlink.c

index 262d0d4..55f0ae6 100644 (file)
@@ -153,6 +153,7 @@ ctnetlink_dump_protoinfo(struct sk_buff *skb, const struct ip_conntrack *ct)
        return ret;
 
 nfattr_failure:
+       ip_conntrack_proto_put(proto);
        return -1;
 }
 
index 77a46ee..ab67c2b 100644 (file)
@@ -161,6 +161,7 @@ ctnetlink_dump_protoinfo(struct sk_buff *skb, const struct nf_conn *ct)
        return ret;
 
 nfattr_failure:
+       nf_ct_proto_put(proto);
        return -1;
 }