Message ID | 20170918183612.113941-1-ebiggers3@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index 6a82090c7fc1..552e4460683b 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c @@ -1411,11 +1411,9 @@ long keyctl_assume_authority(key_serial_t id) } ret = keyctl_change_reqkey_auth(authkey); - if (ret < 0) - goto error; + if (ret == 0) + ret = authkey->serial; key_put(authkey); - - ret = authkey->serial; error: return ret; }