diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-02-24 11:51:39 +0100 |
---|---|---|
committer | Jens Wiklander <jens.wiklander@linaro.org> | 2020-02-27 16:22:05 +0100 |
commit | b83685bceedbeed33a6adc2d0579a011708d2b18 (patch) | |
tree | 871826ba2548317cc4a271fd53d9ef955a5bdf48 /drivers/net/ethernet/intel/ice/ice_common.h | |
parent | Linux 5.6-rc2 (diff) | |
download | linux-b83685bceedbeed33a6adc2d0579a011708d2b18.tar.xz linux-b83685bceedbeed33a6adc2d0579a011708d2b18.zip |
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: 757cc3e9ff1d ("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>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_common.h')
0 files changed, 0 insertions, 0 deletions