diff options
author | Vasily Averin <vvs@openvz.org> | 2022-04-24 20:28:54 +0200 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2022-04-25 22:00:40 +0200 |
commit | acd0b04ecc795e97b7878dccc5cb4d3d627a4c27 (patch) | |
tree | a884915b223c86840cc6f33b774f069b2a600940 /fs | |
parent | ftrace: fix building with SYSCTL=y but DYNAMIC_FTRACE=n (diff) | |
download | linux-acd0b04ecc795e97b7878dccc5cb4d3d627a4c27.tar.xz linux-acd0b04ecc795e97b7878dccc5cb4d3d627a4c27.zip |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/proc_sysctl.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 8901fe0b7e2a..f5b12adee69d 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -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); |