Skip to content

Commit acd0b04

Browse files
Vasily Averinmcgrof
authored andcommitted
sysctl: minor cleanup in new_dir()
Byte zeroing is not required here, since memory was allocated by kzalloc() Signed-off-by: Vasily Averin <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent 8fd7c21 commit acd0b04

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

fs/proc/proc_sysctl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,6 @@ static struct ctl_dir *new_dir(struct ctl_table_set *set,
985985
table = (struct ctl_table *)(node + 1);
986986
new_name = (char *)(table + 2);
987987
memcpy(new_name, name, namelen);
988-
new_name[namelen] = '\0';
989988
table[0].procname = new_name;
990989
table[0].mode = S_IFDIR|S_IRUGO|S_IXUGO;
991990
init_header(&new->header, set->dir.header.root, set, node, table);

0 commit comments

Comments
 (0)