diff options
author | James Morris <james.l.morris@oracle.com> | 2016-05-06 01:29:00 +0200 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2016-05-06 01:29:00 +0200 |
commit | 0250abcd726b4eba8a6175f09656fe544ed6491a (patch) | |
tree | 43ded3d5f9b8b5684879c61ff6d03effdb7ea7c0 /crypto/asymmetric_keys/public_key.c | |
parent | Yama: use atomic allocations when reporting (diff) | |
parent | Merge branch 'keys-trust' into keys-next (diff) | |
download | linux-0250abcd726b4eba8a6175f09656fe544ed6491a.tar.xz linux-0250abcd726b4eba8a6175f09656fe544ed6491a.zip |
Merge tag 'keys-next-20160505' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into next
Diffstat (limited to 'crypto/asymmetric_keys/public_key.c')
-rw-r--r-- | crypto/asymmetric_keys/public_key.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c index 0f8b264b3961..fd76b5fc3b3a 100644 --- a/crypto/asymmetric_keys/public_key.c +++ b/crypto/asymmetric_keys/public_key.c @@ -39,15 +39,23 @@ static void public_key_describe(const struct key *asymmetric_key, /* * Destroy a public key algorithm key. */ -void public_key_destroy(void *payload) +void public_key_free(struct public_key *key) { - struct public_key *key = payload; - - if (key) + if (key) { kfree(key->key); - kfree(key); + kfree(key); + } +} +EXPORT_SYMBOL_GPL(public_key_free); + +/* + * Destroy a public key algorithm key. + */ +static void public_key_destroy(void *payload0, void *payload3) +{ + public_key_free(payload0); + public_key_signature_free(payload3); } -EXPORT_SYMBOL_GPL(public_key_destroy); struct public_key_completion { struct completion completion; |