sysctl: minor cleanup in new_dir()
Byte zeroing is not required here, since memory was allocated by kzalloc() Signed-off-by: Vasily Averin <vvs@openvz.org> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
This commit is contained in:
parent
8fd7c2144d
commit
acd0b04ecc
@ -985,7 +985,6 @@ static struct ctl_dir *new_dir(struct ctl_table_set *set,
|
||||
table = (struct ctl_table *)(node + 1);
|
||||
new_name = (char *)(table + 2);
|
||||
memcpy(new_name, name, namelen);
|
||||
new_name[namelen] = '\0';
|
||||
table[0].procname = new_name;
|
||||
table[0].mode = S_IFDIR|S_IRUGO|S_IXUGO;
|
||||
init_header(&new->header, set->dir.header.root, set, node, table);
|
||||
|
Loading…
Reference in New Issue
Block a user