diff options
author | Miaoqian Lin <linmq006@gmail.com> | 2023-01-02 11:11:42 +0300 |
---|---|---|
committer | Kalle Valo <quic_kvalo@quicinc.com> | 2023-01-18 09:35:09 +0300 |
commit | ed3f83b3459a67a3ab9d806490ac304b567b1c2d (patch) | |
tree | d7a6a4b07be606f1ec01fdaa475347db045e2dfb /drivers/net/wireless/ath/ath11k/dp_rx.c | |
parent | 53a998c4d7284debd77734d01e1466e59a1d03b2 (diff) | |
download | linux-ed3f83b3459a67a3ab9d806490ac304b567b1c2d.tar.xz |
wifi: ath11k: Fix memory leak in ath11k_peer_rx_frag_setup
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
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/dp_rx.c')
-rw-r--r-- | drivers/net/wireless/ath/ath11k/dp_rx.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index be391322956f..b65a84a88264 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -3126,6 +3126,7 @@ int ath11k_peer_rx_frag_setup(struct ath11k *ar, const u8 *peer_mac, int vdev_id if (!peer) { ath11k_warn(ab, "failed to find the peer to set up fragment info\n"); spin_unlock_bh(&ab->base_lock); + crypto_free_shash(tfm); return -ENOENT; } |