Browse files

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: f70e2e0 ('KEYS: Do preallocation for __key_link()')
Signed-off-by: Dan Carpenter <>
  • Loading branch information...
Dan Carpenter authored and andi34 committed May 26, 2016
1 parent 8d57d9a commit e6be44d99a4da21b994d3fbb8de189ec3eeeb884
Showing with 1 addition and 1 deletion.
  1. +1 −1 security/keys/key.c
@@ -580,7 +580,7 @@ int key_reject_and_link(struct key *key,
if (keyring)
if (keyring && link_ret == 0)
__key_link_end(keyring, key->type, prealloc);
/* wake up anyone waiting for a key to be constructed */

0 comments on commit e6be44d

Please sign in to comment.