diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c index a3f85d2a00bb469391fc9a9a504c949e653d4a16..e6d50172872fb2b516f7c88fa3e4ba3e814ffa1a 100644 --- a/security/keys/process_keys.c +++ b/security/keys/process_keys.c @@ -794,6 +794,7 @@ long join_session_keyring(const char *name) ret = PTR_ERR(keyring); goto error2; } else if (keyring == new->session_keyring) { + key_put(keyring); ret = 0; goto error2; }