mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
net: sock: remove the unnecessary check in proto_register
tw_prot_cleanup will check the twsk_prot.
Fixes: 0f5907af39
("net: Fix potential memory leak in proto_register()")
Cc: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cad4162a90
commit
ed744d8193
@ -3531,7 +3531,7 @@ int proto_register(struct proto *prot, int alloc_slab)
|
||||
return ret;
|
||||
|
||||
out_free_timewait_sock_slab:
|
||||
if (alloc_slab && prot->twsk_prot)
|
||||
if (alloc_slab)
|
||||
tw_prot_cleanup(prot->twsk_prot);
|
||||
out_free_request_sock_slab:
|
||||
if (alloc_slab) {
|
||||
|
Loading…
Reference in New Issue
Block a user