aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-11-09 22:01:24 +0800
committerJens Wiklander <jens.wiklander@linaro.org>2022-11-17 09:22:12 +0100
commitcce616e012c215d65c15e5d1afa73182dea49389 (patch)
tree1e5cb49bb289324af1279594b7c0d561034fe482 /scripts/stackusage
parentLinux 6.1-rc5 (diff)
downloadlinux-cce616e012c215d65c15e5d1afa73182dea49389.tar.gz
linux-cce616e012c215d65c15e5d1afa73182dea49389.zip
tee: optee: fix possible memory leak in optee_register_device()
If device_register() returns error in optee_register_device(), the name allocated by dev_set_name() need be freed. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So fix this by calling put_device(), then the name can be freed in kobject_cleanup(), and optee_device is freed in optee_release_device(). Fixes: c3fa24af9244 ("tee: optee: add TEE bus device enumeration support") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions