projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6315277
)
key: Fix resource leak
author
Alan Cox
<alan@linux.intel.com>
Fri, 28 Sep 2012 11:20:02 +0000
(12:20 +0100)
committer
David Howells
<dhowells@redhat.com>
Fri, 28 Sep 2012 11:20:02 +0000
(12:20 +0100)
On an error iov may still have been reallocated and need freeing
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David Howells <dhowells@redhat.com>
security/keys/keyctl.c
patch
|
blob
|
blame
|
history
diff --git
a/security/keys/keyctl.c
b/security/keys/keyctl.c
index 3364fbf46807bb384e61a761f2f6f2fab9ebb888..a0d373f76815c2eafb172666e05e6d9b81220584 100644
(file)
--- a/
security/keys/keyctl.c
+++ b/
security/keys/keyctl.c
@@
-1112,12
+1112,12
@@
long keyctl_instantiate_key_iov(key_serial_t id,
ret = rw_copy_check_uvector(WRITE, _payload_iov, ioc,
ARRAY_SIZE(iovstack), iovstack, &iov);
if (ret < 0)
-
return ret
;
+
goto err
;
if (ret == 0)
goto no_payload_free;
ret = keyctl_instantiate_key_common(id, iov, ioc, ret, ringid);
-
+err:
if (iov != iovstack)
kfree(iov);
return ret;