summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2012-12-26 15:49:40 +0400
committerPablo Neira Ayuso <pablo@netfilter.org>2012-12-27 02:02:09 +0400
commit1310b955c804975651dca6c674ebfd1cb2b4c7ff (patch)
treee12e4e24230c5fb5eeb9c7c4fe6e150ea05307c0 /net
parent32263dd1b43378b4f7d7796ed713f77e95f27e8a (diff)
downloadlinux-1310b955c804975651dca6c674ebfd1cb2b4c7ff.tar.xz
netfilter: ctnetlink: fix leak in error path of ctnetlink_create_expect
This patch fixes a leak in one of the error paths of ctnetlink_create_expect if no helper and no timeout is specified. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 4e078cd84d83..627b0e50b238 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -2624,7 +2624,7 @@ ctnetlink_create_expect(struct net *net, u16 zone,
if (!help) {
if (!cda[CTA_EXPECT_TIMEOUT]) {
err = -EINVAL;
- goto out;
+ goto err_out;
}
exp->timeout.expires =
jiffies + ntohl(nla_get_be32(cda[CTA_EXPECT_TIMEOUT])) * HZ;