diff options
author | Navid Emamdoost <navid.emamdoost@gmail.com> | 2019-09-14 02:08:11 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-10-01 11:18:48 +0200 |
commit | d563131ef23cbc756026f839a82598c8445bc45f (patch) | |
tree | e4f89f8d8e9b45f3b8d01e7f40e07776e1ddff3b /drivers/net/wireless/rsi | |
parent | rtw88: 8822c: fix boolreturn.cocci warnings (diff) | |
download | linux-d563131ef23cbc756026f839a82598c8445bc45f.tar.xz linux-d563131ef23cbc756026f839a82598c8445bc45f.zip |
rsi: release skb if rsi_prepare_beacon fails
In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should
be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/rsi')
-rw-r--r-- | drivers/net/wireless/rsi/rsi_91x_mgmt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c index 6c7f26ef6476..9cc8a335d519 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c +++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c @@ -1756,6 +1756,7 @@ static int rsi_send_beacon(struct rsi_common *common) skb_pull(skb, (64 - dword_align_bytes)); if (rsi_prepare_beacon(common, skb)) { rsi_dbg(ERR_ZONE, "Failed to prepare beacon\n"); + dev_kfree_skb(skb); return -EINVAL; } skb_queue_tail(&common->tx_queue[MGMT_BEACON_Q], skb); |