Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba1fa01d authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso Committed by Sasha Levin
Browse files

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: 0ef71ee1 ("netfilter: ctnetlink: refactor ctnetlink_create_expect")
Reported-by: default avatarTim Wiess <Tim.Wiess@watchguard.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent f17d9f15
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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);