Search Linux Wireless

Re: brcmfmac: fix skb leak in brcmf_sdio_txpkt_prep_sg error path.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



- netdev
+ linux-wireless

On 03/06/14 18:03, Dave Jones wrote:
Commit 1eb4301867 added an allocation of an skb via brcmu_pkt_buf_get_skb()
but forgot to free it on one of the error paths.

- Cc: Arend van Spriel<arend@xxxxxxxxxxxx>
+ Acked-by: Arend van Spriel <arend@xxxxxxxxxxxx
Signed-off-by: Dave Jones<davej@xxxxxxxxxxxxxxxxx>
---
I guess you intend John to take this patch, right?

Regards,
Arend

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
index 119ee6eaf1c3..ddaa9efd053d 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
@@ -1948,8 +1948,10 @@ static int brcmf_sdio_txpkt_prep_sg(struct brcmf_sdio *bus,
  		if (pkt_pad == NULL)
  			return -ENOMEM;
  		ret = brcmf_sdio_txpkt_hdalign(bus, pkt_pad);
-		if (unlikely(ret<  0))
+		if (unlikely(ret<  0)) {
+			kfree_skb(pkt_pad);
  			return ret;
+		}
  		memcpy(pkt_pad->data,
  		       pkt->data + pkt->len - tail_chop,
  		       tail_chop);



--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux