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>
This commit is contained in:
parent
32263dd1b4
commit
1310b955c8
@ -2624,7 +2624,7 @@ ctnetlink_create_expect(struct net *net, u16 zone,
|
|||||||
if (!help) {
|
if (!help) {
|
||||||
if (!cda[CTA_EXPECT_TIMEOUT]) {
|
if (!cda[CTA_EXPECT_TIMEOUT]) {
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
exp->timeout.expires =
|
exp->timeout.expires =
|
||||||
jiffies + ntohl(nla_get_be32(cda[CTA_EXPECT_TIMEOUT])) * HZ;
|
jiffies + ntohl(nla_get_be32(cda[CTA_EXPECT_TIMEOUT])) * HZ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user