diff options
author | Navid Emamdoost <navid.emamdoost@gmail.com> | 2020-07-18 07:31:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-21 03:31:33 +0200 |
commit | 1e8fd3a97f2d83a7197876ceb4f37b4c2b00a0f3 (patch) | |
tree | 619588b20321d2b3ae9f425bb5860b1be273ff3e /drivers/nfc/s3fwrn5 | |
parent | crypto/chtls: correct net_device reference count (diff) | |
download | linux-1e8fd3a97f2d83a7197876ceb4f37b4c2b00a0f3.tar.xz linux-1e8fd3a97f2d83a7197876ceb4f37b4c2b00a0f3.zip |
nfc: s3fwrn5: add missing release on skb in s3fwrn5_recv_frame
The implementation of s3fwrn5_recv_frame() is supposed to consume skb on
all execution paths. Release skb before returning -ENODEV.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/nfc/s3fwrn5')
-rw-r--r-- | drivers/nfc/s3fwrn5/core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nfc/s3fwrn5/core.c b/drivers/nfc/s3fwrn5/core.c index 91d4d5b28a7d..ba6c486d6465 100644 --- a/drivers/nfc/s3fwrn5/core.c +++ b/drivers/nfc/s3fwrn5/core.c @@ -198,6 +198,7 @@ int s3fwrn5_recv_frame(struct nci_dev *ndev, struct sk_buff *skb, case S3FWRN5_MODE_FW: return s3fwrn5_fw_recv_frame(ndev, skb); default: + kfree_skb(skb); return -ENODEV; } } |