aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asymmetric_keys/public_key.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-06-08 09:26:46 +0200
committerIngo Molnar <mingo@kernel.org>2016-06-08 09:26:46 +0200
commit616d1c1b98ac79f30216a57a170dd7cea19b3df3 (patch)
tree6f244c2e5a7160190e73bc82b4cd7fa7bb22ee31 /crypto/asymmetric_keys/public_key.c
parentperf/core: Fix crash due to account/unaccount_sb_event() inconsistency (diff)
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (diff)
downloadlinux-dev-616d1c1b98ac79f30216a57a170dd7cea19b3df3.tar.xz
linux-dev-616d1c1b98ac79f30216a57a170dd7cea19b3df3.zip
Merge branch 'linus' into perf/core, to refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'crypto/asymmetric_keys/public_key.c')
-rw-r--r--crypto/asymmetric_keys/public_key.c20
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;