diff options
author | Dave Jones <davej@redhat.com> | 2014-03-06 20:51:08 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-03-13 18:57:26 (GMT) |
commit | 2dc3a8e0b6e10c77798a4f6f711ce66334eda1c4 (patch) | |
tree | f52b3ffb17940deb3eb02f12d2bff8cab73e032f /drivers | |
parent | d51246481c7f28bbfa1f814ded2da65e531cd4b2 (diff) | |
download | linux-2dc3a8e0b6e10c77798a4f6f711ce66334eda1c4.tar.xz |
brcmfmac: fix skb leak in brcmf_sdio_txpkt_prep_sg error path.
Commit 1eb4301867 (brcmfmac: fix txglomming scatter-gather packet transfers)
added an allocation of an skb via brcmu_pkt_buf_get_skb() but forgot to
free it on one of the error paths.
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Dave Jones<davej@fedoraproject.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c index 119ee6e..ddaa9ef 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); |