Skip to content
Commit 0834ced6 authored by Yu Liao's avatar Yu Liao Committed by Jakub Kicinski
Browse files

net/tls: Fix memory leak in tls_enc_skb() and tls_sw_fallback_init()



'aead_req' and 'aead_send' is allocated but not freed in default switch
case. This commit fixes the potential memory leak by freeing them under
the situation.

Note that the default cases here should never be reached as they'd
mean we allowed offloading an unsupported algorithm.

Fixes: ea7a9d88 ("net/tls: Use cipher sizes structs")
Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
Reviewed-by: default avatarGal Pressman <gal@nvidia.com>
Link: https://lore.kernel.org/r/20221110090329.2036382-1-liaoyu15@huawei.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 77711683
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