summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBurman Yan <yan_952@hotmail.com>2006-12-07 05:38:51 +0100
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 17:39:41 +0100
commit4668edc334ee90cf50c382c3e423cfc510b5a126 (patch)
treeee25ca93e72031f7f333b6c251a57a55ef089c90 /lib
parent[PATCH] net: don't insert socket dentries into dentry_hashtable (diff)
downloadlinux-4668edc334ee90cf50c382c3e423cfc510b5a126.tar.xz
linux-4668edc334ee90cf50c382c3e423cfc510b5a126.zip
[PATCH] kernel core: replace kmalloc+memset with kzalloc
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/kobject.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index 744a4b102c7f..7ce6dc138e90 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -111,10 +111,9 @@ char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask)
len = get_kobj_path_length(kobj);
if (len == 0)
return NULL;
- path = kmalloc(len, gfp_mask);
+ path = kzalloc(len, gfp_mask);
if (!path)
return NULL;
- memset(path, 0x00, len);
fill_kobj_path(kobj, path, len);
return path;