diff options
author | Vasily Averin <vvs@openvz.org> | 2022-04-24 21:28:54 +0300 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2022-04-25 13:00:40 -0700 |
commit | acd0b04ecc795e97b7878dccc5cb4d3d627a4c27 (patch) | |
tree | a884915b223c86840cc6f33b774f069b2a600940 /fs/proc/proc_sysctl.c | |
parent | 8fd7c2144d1292f15c901211750dee021ed5079a (diff) | |
download | linux-acd0b04ecc795e97b7878dccc5cb4d3d627a4c27.tar.bz2 |
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/proc/proc_sysctl.c')
-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); |