Commit e9128c14 authored by Kefeng Wang's avatar Kefeng Wang Committed by David S. Miller

ipv4: icmp: use icmp_sk_exit()

Simply use icmp_sk_exit() when inet_ctl_sock_create() fail in icmp_sk_init().
Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4ef595cb
...@@ -1245,9 +1245,7 @@ static int __net_init icmp_sk_init(struct net *net) ...@@ -1245,9 +1245,7 @@ static int __net_init icmp_sk_init(struct net *net)
return 0; return 0;
fail: fail:
for_each_possible_cpu(i) icmp_sk_exit(net);
inet_ctl_sock_destroy(*per_cpu_ptr(net->ipv4.icmp_sk, i));
free_percpu(net->ipv4.icmp_sk);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment