Skip to content

Commit

Permalink
rsi: release skb if rsi_prepare_beacon fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Navidem authored and Kalle Valo committed Oct 1, 2019
1 parent 0d32f5d commit d563131
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/rsi/rsi_91x_mgmt.c
Expand Up @@ -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);
Expand Down

0 comments on commit d563131

Please sign in to comment.