Commit 3bdae810 authored by Florian Fainelli's avatar Florian Fainelli Committed by Kalle Valo

brcmfmac: Fix glob_skb leak in brcmf_sdiod_recv_chain

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: a413e39a ("brcmfmac: fix brcmf_sdcard_recv_chain() for host without sg support")
Signed-off-by: default avatarFlorian Fainelli <>
Acked-by: default avatarArend van Spriel <>
Signed-off-by: default avatarKalle Valo <>
parent cc2d1de0
......@@ -726,8 +726,10 @@ int brcmf_sdiod_recv_chain(struct brcmf_sdio_dev *sdiodev,
return -ENOMEM;
err = brcmf_sdiod_buffrw(sdiodev, SDIO_FUNC_2, false, addr,
if (err)
if (err) {
goto done;
skb_queue_walk(pktq, skb) {
memcpy(skb->data, glom_skb->data, skb->len);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment