Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 517ce4e9 authored by Pan Bian's avatar Pan Bian Committed by David S. Miller
Browse files

NFC: fdp: fix incorrect free object



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: default avatarPan Bian <bianpan2016@163.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f75359f3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -259,7 +259,7 @@ static void fdp_nci_i2c_read_device_properties(struct device *dev,
						  *fw_vsc_cfg, len);

		if (r) {
			devm_kfree(dev, fw_vsc_cfg);
			devm_kfree(dev, *fw_vsc_cfg);
			goto vsc_read_err;
		}
	} else {