mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
NFC: st95hf: Fix memleak in st95hf_in_send_cmd
[ Upstream commit f97c04c316d8fea16dca449fdfbe101fbdfee6a2 ] When down_killable() fails, skb_resp should be freed just like when st95hf_spi_send() fails. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ac10e8c968
commit
60a585d4bc
@ -981,7 +981,7 @@ static int st95hf_in_send_cmd(struct nfc_digital_dev *ddev,
|
||||
rc = down_killable(&stcontext->exchange_lock);
|
||||
if (rc) {
|
||||
WARN(1, "Semaphore is not found up in st95hf_in_send_cmd\n");
|
||||
return rc;
|
||||
goto free_skb_resp;
|
||||
}
|
||||
|
||||
rc = st95hf_spi_send(&stcontext->spicontext, skb->data,
|
||||
|
Loading…
x
Reference in New Issue
Block a user