NFC: fdp: fix incorrect free object
authorPan Bian <bianpan2016@163.com>
Tue, 5 Nov 2019 08:34:07 +0000 (16:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2019 18:20:29 +0000 (19:20 +0100)
commit760a1f7f22ee8f7636a00a57707df5095364f0e0
tree0fabb7f7c956dfa72448e9ad0c7d8e0f925887f5
parent5580091ce7d9555447c06508b55b95c0b79c6266
NFC: fdp: fix incorrect free object

[ Upstream commit 517ce4e93368938b204451285e53014549804868 ]

The address of fw_vsc_cfg is on stack. Releasing it with devm_kfree() is
incorrect, which may result in a system crash or other security impacts.
The expected object to free is *fw_vsc_cfg.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nfc/fdp/i2c.c