]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
netfilter: ctnetlink: fix leak in error path of ctnetlink_create_expect
authorJesper Juhl <jj@chaosbits.net>
Wed, 26 Dec 2012 11:49:40 +0000 (11:49 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 26 Dec 2012 22:02:09 +0000 (23:02 +0100)
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>
net/netfilter/nf_conntrack_netlink.c

index 4e078cd84d83c2c15c70ab4270b87a05e590f4ad..627b0e50b2389120e86ed107a3af01d690e07a29 100644 (file)
@@ -2624,7 +2624,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;