Skip to content

Commit

Permalink
keys: PTR_ERR return of wrong pointer in keyctl_get_security()
Browse files Browse the repository at this point in the history
Return the PTR_ERR of the correct pointer.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
RoelKluin authored and James Morris committed Dec 16, 2009
1 parent d4220f9 commit fa1cc7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/keys/keyctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ long keyctl_get_security(key_serial_t keyid,
* have the authorisation token handy */
instkey = key_get_instantiation_authkey(keyid);
if (IS_ERR(instkey))
return PTR_ERR(key_ref);
return PTR_ERR(instkey);
key_put(instkey);

key_ref = lookup_user_key(keyid, KEY_LOOKUP_PARTIAL, 0);
Expand Down

0 comments on commit fa1cc7b

Please sign in to comment.