mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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: Pan Bian <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
f75359f3ac
commit
517ce4e933
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue