Skip to content

Commit fa1cc7b

Browse files
RoelKluinxjamesmorris
authored andcommitted
keys: PTR_ERR return of wrong pointer in keyctl_get_security()
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>
1 parent d4220f9 commit fa1cc7b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

security/keys/keyctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ long keyctl_get_security(key_serial_t keyid,
11941194
* have the authorisation token handy */
11951195
instkey = key_get_instantiation_authkey(keyid);
11961196
if (IS_ERR(instkey))
1197-
return PTR_ERR(key_ref);
1197+
return PTR_ERR(instkey);
11981198
key_put(instkey);
11991199

12001200
key_ref = lookup_user_key(keyid, KEY_LOOKUP_PARTIAL, 0);

0 commit comments

Comments
 (0)