NFC: nfcmrvl: double free on error path
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 8 Mar 2017 05:22:37 +0000 (08:22 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Mar 2018 08:17:46 +0000 (09:17 +0100)
commit8f2c9f6c575969c7d5336cae0c73f7f45ffbfd73
treebf4263a7b71dea5ce18ca5a08dac3e125e66e5f9
parentc95acb7bbefb4267c8df48b963d977262268de0a
NFC: nfcmrvl: double free on error path

[ Upstream commit ca42fb9e52d155547e6cf18cf26bce3e1a6af4ea ]

The nci_spi_send() function calls kfree_skb(skb) on both error and
success so this extra kfree_skb() is a double free.

Fixes: caf6e49bf6d0 ("NFC: nfcmrvl: add spi driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nfc/nfcmrvl/spi.c