diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2020-08-10 08:16:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-11 15:36:14 -0700 |
commit | 0f5907af39137f8183ed536aaa00f322d7365130 (patch) | |
tree | 0bc42a52e428f273b2ce6d0d68e85ea2402c0a1c /drivers/net/phy/marvell10g.c | |
parent | 50caa777a3a24d7027748e96265728ce748b41ef (diff) | |
download | lwn-0f5907af39137f8183ed536aaa00f322d7365130.tar.gz lwn-0f5907af39137f8183ed536aaa00f322d7365130.zip |
net: Fix potential memory leak in proto_register()
If we failed to assign proto idx, we free the twsk_slab_name but forget to
free the twsk_slab. Add a helper function tw_prot_cleanup() to free these
together and also use this helper function in proto_unregister().
Fixes: b45ce32135d1 ("sock: fix potential memory leak in proto_register()")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/marvell10g.c')
0 files changed, 0 insertions, 0 deletions