diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2016-07-18 16:24:34 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-07 15:21:25 +0200 |
commit | c5f4ac50d97527ea0bce0284e6605c07d730e1b1 (patch) | |
tree | 1f00f7d1f335f70599969c814c59bb2fd2b49950 /drivers | |
parent | 44ced8fcf96783928aa4f0aa3b87721b88e562c8 (diff) | |
download | linux-stable-c5f4ac50d97527ea0bce0284e6605c07d730e1b1.tar.gz linux-stable-c5f4ac50d97527ea0bce0284e6605c07d730e1b1.tar.bz2 linux-stable-c5f4ac50d97527ea0bce0284e6605c07d730e1b1.zip |
brcmfmac: Fix glob_skb leak in brcmf_sdiod_recv_chain
commit 3bdae810721b33061d2e541bd78a70f86ca42af3 upstream.
In case brcmf_sdiod_recv_chain() cannot complete a succeful call to
brcmf_sdiod_buffrw, we would be leaking glom_skb and not free it as we
should, fix this.
Reported-by: coverity (CID 1164856)
Fixes: a413e39a38573 ("brcmfmac: fix brcmf_sdcard_recv_chain() for host without sg support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index c7550dab6a23..570c80a5419d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -722,8 +722,10 @@ int brcmf_sdiod_recv_chain(struct brcmf_sdio_dev *sdiodev, return -ENOMEM; err = brcmf_sdiod_buffrw(sdiodev, SDIO_FUNC_2, false, addr, glom_skb); - if (err) + if (err) { + brcmu_pkt_buf_free_skb(glom_skb); goto done; + } skb_queue_walk(pktq, skb) { memcpy(skb->data, glom_skb->data, skb->len); |