mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-19 12:49:10 +08:00
Merge tag 'optee-fix-for-6.1' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes
Fix possible memory leak in optee_register_device() * tag 'optee-fix-for-6.1' of https://git.linaro.org/people/jens.wiklander/linux-tee: tee: optee: fix possible memory leak in optee_register_device() Link: https://lore.kernel.org/r/Y3d2OuJ60U30OkZe@jade Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -80,7 +80,7 @@ static int optee_register_device(const uuid_t *device_uuid)
|
||||
rc = device_register(&optee_device->dev);
|
||||
if (rc) {
|
||||
pr_err("device registration failed, err: %d\n", rc);
|
||||
kfree(optee_device);
|
||||
put_device(&optee_device->dev);
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user