aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-mod.c
diff options
context:
space:
mode:
authorYang Yingliang <[email protected]>2022-11-09 22:01:24 +0800
committerJens Wiklander <[email protected]>2022-11-17 09:22:12 +0100
commitcce616e012c215d65c15e5d1afa73182dea49389 (patch)
tree1e5cb49bb289324af1279594b7c0d561034fe482 /lib/mpi/mpi-mod.c
parent094226ad94f471a9f19e8f8e7140a09c2625abaa (diff)
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 <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions