summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorWen Yang <wenyang@linux.alibaba.com>2019-11-25 18:54:09 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-09 12:20:03 +0300
commit7da501c21a4aab22956c9323e04453a7ebe329d2 (patch)
treeb6736a76e4f75d942f1e6ced0efcfd81d3cac375 /README
parent3d29dc60aac16831b1822c831a7f40b45a9686d9 (diff)
downloadlinux-7da501c21a4aab22956c9323e04453a7ebe329d2.tar.xz
firmware: arm_scmi: Avoid double free in error flow
commit 8305e90a894f82c278c17e51a28459deee78b263 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions