Skip to content

Commit

Permalink
nfc: s3fwrn5: add missing release on skb in s3fwrn5_recv_frame
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Navid Emamdoost authored and David S. Miller committed Jul 21, 2020
1 parent 30d9e50 commit 1e8fd3a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/nfc/s3fwrn5/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 1e8fd3a

Please sign in to comment.