mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
NFC: st95hf: Fix memleak in st95hf_in_send_cmd
[ Upstream commit f97c04c316
]
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
0faee7f8c2
commit
818c725c12
1 changed files with 1 additions and 1 deletions
|
@ -966,7 +966,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…
Reference in a new issue