linux/drivers/tee
Dan Carpenter b83685bcee tee: amdtee: fix memory leak in amdtee_open_session()
On these error paths the "sess" variable isn't freed.  It's a refcounted
pointer so we need to call kref_put().  I re-arranged the code a bit so
the error case is always handled before the success case and the error
paths are indented two tabs.

Fixes: 757cc3e9ff ("tee: add AMD-TEE driver")
Reviewed-by: Rijo Thomas <Rijo-john.Thomas@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2020-02-27 16:22:05 +01:00
..
amdtee tee: amdtee: fix memory leak in amdtee_open_session() 2020-02-27 16:22:05 +01:00
optee ARM: SoC-related driver updates 2020-02-08 14:04:19 -08:00
Kconfig tee: add AMD-TEE driver 2020-01-04 13:49:51 +08:00
Makefile tee: add AMD-TEE driver 2020-01-04 13:49:51 +08:00
tee_core.c compat_ioctl: move more drivers to compat_ptr_ioctl 2019-10-23 17:23:44 +02:00
tee_private.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
tee_shm_pool.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
tee_shm.c drm/tee_shm: Drop dma_buf_k(unmap) support 2019-11-25 22:36:25 +01:00