]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
nfc: s3fwrn5: add missing release on skb in s3fwrn5_recv_frame
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Sat, 18 Jul 2020 05:31:49 +0000 (00:31 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2020 01:31:33 +0000 (18:31 -0700)
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>
drivers/nfc/s3fwrn5/core.c

index 91d4d5b28a7d9e41dd1b45976f62c9eb2569a249..ba6c486d64659720431977b28e6d44a43659ca5e 100644 (file)
@@ -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;
        }
 }