Skip to contentSkip to conversation

rsi: release skb if rsi_prepare_beacon fails

PATCH In review Navid Emamdoost 2 participants 2 messages Sep 14, 2019 – Oct 1, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rsi: release skb if rsi_prepare_beacon fails

In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should be released.

---
 drivers/net/wireless/rsi/rsi_91x_mgmt.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/rsi/rsi_91x_mgmt.c +1 -0
index 6c7f26ef6476..9cc8a335d519 100644
@@ -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);
Signature · 1 line
2.17.1
#1 lore raw
Quoted 4 lines · Navid Emamdoost

In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should be released.

Patch applied to wireless-drivers-next.git, thanks.

d563131ef23c rsi: release skb if rsi_prepare_beacon fails

Signature · 3 lines
https://patchwork.kernel.org/patch/11145515/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches