]> git.hungrycats.org Git - linux/commitdiff
netfilter: ctnetlink: put back references to master ct and expect objects
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 9 Jul 2015 20:56:00 +0000 (22:56 +0200)
committerJiri Slaby <jslaby@suse.cz>
Wed, 28 Oct 2015 15:37:52 +0000 (16:37 +0100)
commit 95dd8653de658143770cb0e55a58d2aab97c79d2 upstream.

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: Jiri Slaby <jslaby@suse.cz>
net/netfilter/nf_conntrack_netlink.c

index eea936b70d15407be5f69681de0a8ecf0fbcbc05..db744dd68707052b9a34f5f8ea438da07f9e8cf4 100644 (file)
@@ -2925,11 +2925,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);