mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
KEYS: potential uninitialized variable
If __key_link_begin() failed then "edit" would be uninitialized. I've
added a check to fix that.
Change-Id: I0e28bdba07f645437db2b08daf67ca27f16c6f5c
Fixes: f70e2e0619
('KEYS: Do preallocation for __key_link()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
This commit is contained in:
parent
cdd4896645
commit
0f76e6ad56
1 changed files with 1 additions and 1 deletions
|
@ -573,7 +573,7 @@ int key_reject_and_link(struct key *key,
|
|||
|
||||
mutex_unlock(&key_construction_mutex);
|
||||
|
||||
if (keyring)
|
||||
if (keyring && link_ret == 0)
|
||||
__key_link_end(keyring, key->type, prealloc);
|
||||
|
||||
/* wake up anyone waiting for a key to be constructed */
|
||||
|
|
Loading…
Reference in a new issue