wifi: ath11k: Fix memory leak in ath11k_peer_rx_frag_setup
authorMiaoqian Lin <linmq006@gmail.com>
Mon, 2 Jan 2023 08:11:42 +0000 (12:11 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:11 +0000 (09:39 +0100)
commit53c8a256e5d3f31d80186de03a3d2a7f747b2aa0
treec47254942d53a9e328aa2ee9d8a1737d5ec6946d
parent1af7eacfad45149c54893a8a9df9e92ef89f0a90
wifi: ath11k: Fix memory leak in ath11k_peer_rx_frag_setup

[ Upstream commit ed3f83b3459a67a3ab9d806490ac304b567b1c2d ]

crypto_alloc_shash() allocates resources, which should be released by
crypto_free_shash(). When ath11k_peer_find() fails, there has memory
leak. Add missing crypto_free_shash() to fix this.

Fixes: 243874c64c81 ("ath11k: handle RX fragments")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230102081142.3937570-1-linmq006@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath11k/dp_rx.c