diff options
author | Wen Yang <wenyang@linux.alibaba.com> | 2019-11-25 18:54:09 +0300 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2019-11-26 13:50:30 +0300 |
commit | 8305e90a894f82c278c17e51a28459deee78b263 (patch) | |
tree | 9863324162c61ee80ef4f4365b204cf0db5f5c0c /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 7bd39bc6bfdf96f5df0f92199bbc1a3ee2f2adb8 (diff) | |
download | linux-8305e90a894f82c278c17e51a28459deee78b263.tar.xz |
firmware: arm_scmi: Avoid double free in error flow
If device_register() fails, both put_device() and kfree() are called,
ending with a double free of the scmi_dev.
Calling kfree() is needed only when a failure happens between the
allocation of the scmi_dev and its registration, so move it to there
and remove it from the error flow.
Fixes: 46edb8d1322c ("firmware: arm_scmi: provide the mandatory device release callback")
Signed-off-by: Wen Yang <wenyang@linux.alibaba.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions