summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2015-07-09 22:56:00 +0200
committerSasha Levin <sasha.levin@oracle.com>2015-10-27 22:13:34 -0400
commitba1fa01d6d2ed019df3d6fe7ac3585d1f8902cd9 (patch)
treef989cf5ca0741f60a2e91788248e2347f544d5a2 /net
parentf17d9f15f635251d811f5fbc319c114b9be2790f (diff)
netfilter: ctnetlink: put back references to master ct and expect objects
[ Upstream commit 95dd8653de658143770cb0e55a58d2aab97c79d2 ] We have to put back the references to the master conntrack and the expectation that we just created, otherwise we'll leak them. Fixes: 0ef71ee1a5b9 ("netfilter: ctnetlink: refactor ctnetlink_create_expect") Reported-by: Tim Wiess <Tim.Wiess@watchguard.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_netlink.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 1bd9ed9e62f6..d3ea2999d0dc 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -2956,11 +2956,6 @@ ctnetlink_create_expect(struct net *net, u16 zone,
}
err = nf_ct_expect_related_report(exp, portid, report);
- if (err < 0)
- goto err_exp;
-
- return 0;
-err_exp:
nf_ct_expect_put(exp);
err_ct:
nf_ct_put(ct);