diff options
author | David S. Miller <davem@davemloft.net> | 2011-07-06 08:23:37 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-06 08:23:37 +0200 |
commit | e12fe68ce34d60c04bb1ddb1d3cc5c3022388fe4 (patch) | |
tree | 83c0e192ccaa4752c80b6131a7d0aa8272b5d0d0 /security | |
parent | b44: Use pr_<level>_once and DRV_DESCRIPTION (diff) | |
parent | net: vlan: enable soft features regardless of underlying device (diff) | |
download | linux-e12fe68ce34d60c04bb1ddb1d3cc5c3022388fe4.tar.xz linux-e12fe68ce34d60c04bb1ddb1d3cc5c3022388fe4.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'security')
-rw-r--r-- | security/keys/request_key.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/keys/request_key.c b/security/keys/request_key.c index 8e319a416eec..82465328c39b 100644 --- a/security/keys/request_key.c +++ b/security/keys/request_key.c @@ -469,7 +469,7 @@ static struct key *construct_key_and_link(struct key_type *type, } else if (ret == -EINPROGRESS) { ret = 0; } else { - key = ERR_PTR(ret); + goto couldnt_alloc_key; } key_put(dest_keyring); @@ -479,6 +479,7 @@ static struct key *construct_key_and_link(struct key_type *type, construction_failed: key_negate_and_link(key, key_negative_timeout, NULL, NULL); key_put(key); +couldnt_alloc_key: key_put(dest_keyring); kleave(" = %d", ret); return ERR_PTR(ret); |