Zero memory after malloc. This stops sysinstall from dumping core
during disk probing with malloc debugging enabled. MFC after: 1 week
This commit is contained in:
parent
c4222cfe76
commit
5060afe8bc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105005
@ -515,6 +515,7 @@ Disk_Names()
|
||||
error = sysctlbyname("kern.disks", NULL, &listsize, NULL, 0);
|
||||
if (!error) {
|
||||
disklist = (char *)malloc(listsize);
|
||||
memset(disklist, 0, listsize);
|
||||
error = sysctlbyname("kern.disks", disklist, &listsize, NULL, 0);
|
||||
if (error)
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user