summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2012-12-26 11:49:40 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-03 18:27:08 -0600
commitfae56feb6210422096d1886516022a3eedc515c9 (patch)
treead46ce89a32e2a74286c032a332c56a8ff49566e /net
parentff89a34cb5b28ed5eb35056fffe4cff380537c3d (diff)
netfilter: ctnetlink: fix leak in error path of ctnetlink_create_expect
commit 1310b955c804975651dca6c674ebfd1cb2b4c7ff upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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 7bbfb3deea30..ef9e86ecb773 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -2514,7 +2514,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;