Skip to content

Commit d563131

Browse files
NavidemKalle Valo
authored andcommitted
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>
1 parent 0d32f5d commit d563131

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/wireless/rsi/rsi_91x_mgmt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,6 +1756,7 @@ static int rsi_send_beacon(struct rsi_common *common)
17561756
skb_pull(skb, (64 - dword_align_bytes));
17571757
if (rsi_prepare_beacon(common, skb)) {
17581758
rsi_dbg(ERR_ZONE, "Failed to prepare beacon\n");
1759+
dev_kfree_skb(skb);
17591760
return -EINVAL;
17601761
}
17611762
skb_queue_tail(&common->tx_queue[MGMT_BEACON_Q], skb);

0 commit comments

Comments
 (0)