Commit c54ea3b95ac504ed81e0ec3acfaa26d0f55bdfa4

Authored by Patrick McHardy
Committed by David S. Miller
1 parent 334c85569b

[NETFILTER]: ctnetlink: fix leak in ctnetlink_create_conntrack error path

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff

net/ipv4/netfilter/ip_conntrack_netlink.c
... ... @@ -959,7 +959,7 @@
959 959 if (cda[CTA_PROTOINFO-1]) {
960 960 err = ctnetlink_change_protoinfo(ct, cda);
961 961 if (err < 0)
962   - return err;
  962 + goto err;
963 963 }
964 964  
965 965 #if defined(CONFIG_IP_NF_CONNTRACK_MARK)
net/netfilter/nf_conntrack_netlink.c
... ... @@ -981,7 +981,7 @@
981 981 if (cda[CTA_PROTOINFO-1]) {
982 982 err = ctnetlink_change_protoinfo(ct, cda);
983 983 if (err < 0)
984   - return err;
  984 + goto err;
985 985 }
986 986  
987 987 #if defined(CONFIG_NF_CONNTRACK_MARK)