Skip to content

Commit

Permalink
[NETFILTER]: ctnetlink: fix reference count leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kaber authored and David S. Miller committed Nov 29, 2006
1 parent 22e7410 commit c537b75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv4/netfilter/ip_conntrack_netlink.c
Expand Up @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions net/netfilter/nf_conntrack_netlink.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit c537b75

Please sign in to comment.