[PATCH] use kzalloc and kcalloc in core fs code
Signed-off-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
656bde5728
commit
11b0b5abb2
@@ -1476,10 +1476,9 @@ int compat_do_execve(char * filename,
|
||||
int i;
|
||||
|
||||
retval = -ENOMEM;
|
||||
bprm = kmalloc(sizeof(*bprm), GFP_KERNEL);
|
||||
bprm = kzalloc(sizeof(*bprm), GFP_KERNEL);
|
||||
if (!bprm)
|
||||
goto out_ret;
|
||||
memset(bprm, 0, sizeof(*bprm));
|
||||
|
||||
file = open_exec(filename);
|
||||
retval = PTR_ERR(file);
|
||||
|
Reference in New Issue
Block a user