Message ID | 20210422134151.28905-1-xiangxia.m.yue@gmail.com |
---|---|
State | New |
Headers | show |
Series | net: sock: remove the unnecessary check in proto_register | expand |
Hi: On 2021/4/24 4:20, patchwork-bot+netdevbpf@kernel.org wrote: > Hello: > > This patch was applied to netdev/net-next.git (refs/heads/master): > > On Thu, 22 Apr 2021 21:41:51 +0800 you wrote: >> From: Tonghao Zhang <xiangxia.m.yue@gmail.com> >> >> tw_prot_cleanup will check the twsk_prot. >> >> Fixes: 0f5907af3913 ("net: Fix potential memory leak in proto_register()") Thanks for the patch. But I don't think this Fixes tag is needed as this is a cleanup and do not fix anything. Thanks. >> Cc: Miaohe Lin <linmiaohe@huawei.com> >> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> >> >> [...] > > Here is the summary with links: > - net: sock: remove the unnecessary check in proto_register > https://git.kernel.org/netdev/net-next/c/ed744d819379 > > You are awesome, thank you! > -- > Deet-doot-dot, I am a bot. > https://korg.docs.kernel.org/patchwork/pwbot.html > > > . >
diff --git a/net/core/sock.c b/net/core/sock.c index 5ec90f99e102..c761c4a0b66b 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -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) {