diff options
| author | Zilin Guan <zilin@seu.edu.cn> | 2025-11-06 14:45:11 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-11-10 17:53:47 -0800 |
| commit | 3072f00bba764082fa41b3c3a2a7b013335353d2 (patch) | |
| tree | 7d71900be38ff790aba42e7a35697bf4a462fec6 /net/tipc/net.c | |
| parent | ec33f2e5a2d0dbbfd71435209aee812fdc9369b8 (diff) | |
net/handshake: Fix memory leak in tls_handshake_accept()
In tls_handshake_accept(), a netlink message is allocated using
genlmsg_new(). In the error handling path, genlmsg_cancel() is called
to cancel the message construction, but the message itself is not freed.
This leads to a memory leak.
Fix this by calling nlmsg_free() in the error path after genlmsg_cancel()
to release the allocated memory.
Fixes: 2fd5532044a89 ("net/handshake: Add a kernel API for requesting a TLSv1.3 handshake")
Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20251106144511.3859535-1-zilin@seu.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tipc/net.c')
0 files changed, 0 insertions, 0 deletions