[NETFILTER]: ctnetlink: fix leak in ctnetlink_create_conntrack error path
authorPatrick McHardy <kaber@trash.net>
Tue, 16 Jan 2007 01:16:03 +0000 (17:16 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 24 Jan 2007 04:25:42 +0000 (20:25 -0800)
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/ip_conntrack_netlink.c
net/netfilter/nf_conntrack_netlink.c

index 5fcf91d617cd44e66a59559b31636c144307a6ac..6f31fad9be13854731486737b30311c4b4f2e1a2 100644 (file)
@@ -959,7 +959,7 @@ ctnetlink_create_conntrack(struct nfattr *cda[],
        if (cda[CTA_PROTOINFO-1]) {
                err = ctnetlink_change_protoinfo(ct, cda);
                if (err < 0)
-                       return err;
+                       goto err;
        }
 
 #if defined(CONFIG_IP_NF_CONNTRACK_MARK)
index bd1d2de75e459deba86c0fcdcfd62cbbbc2364cc..811e3e782f0f2f36c4257ed778e1301172579a7c 100644 (file)
@@ -981,7 +981,7 @@ ctnetlink_create_conntrack(struct nfattr *cda[],
        if (cda[CTA_PROTOINFO-1]) {
                err = ctnetlink_change_protoinfo(ct, cda);
                if (err < 0)
-                       return err;
+                       goto err;
        }
 
 #if defined(CONFIG_NF_CONNTRACK_MARK)