summaryrefslogtreecommitdiff
path: root/security/keys/key.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-12-07 07:33:47 +0300
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 19:39:25 +0300
commit48ad504ee7d598431cb2d0b2f01c6d1aff1d2a07 (patch)
tree52862e12cdca605b04959fc0fa28164dc015013b /security/keys/key.c
parent7cf9c2c76c1a17b32f2da85b50cd4fe468ed44b5 (diff)
downloadlinux-48ad504ee7d598431cb2d0b2f01c6d1aff1d2a07.tar.xz
[PATCH] security/keys/*: user kmemdup()
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-By: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'security/keys/key.c')
-rw-r--r--security/keys/key.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/security/keys/key.c b/security/keys/key.c
index 0db816f10f85..ac9326c5f1da 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -290,11 +290,9 @@ struct key *key_alloc(struct key_type *type, const char *desc,
goto no_memory_2;
if (desc) {
- key->description = kmalloc(desclen, GFP_KERNEL);
+ key->description = kmemdup(desc, desclen, GFP_KERNEL);
if (!key->description)
goto no_memory_3;
-
- memcpy(key->description, desc, desclen);
}
atomic_set(&key->usage, 1);