NFC: fdp: fix incorrect free object
commita5f9f1aca5d55a986e3faf648c7067d9ae24574f
authorPan Bian <bianpan2016@163.com>
Tue, 5 Nov 2019 08:34:07 +0000 (5 16:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2019 18:13:15 +0000 (12 19:13 +0100)
tree2ac98342ff148e368c82c38c7ae7d18fff33e193
parent817e5140ed12cfb67f8d33de75dccce03895230d
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