summaryrefslogtreecommitdiffstats
path: root/lib/libdisk
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2002-10-12 22:01:57 +0000
committerkris <kris@FreeBSD.org>2002-10-12 22:01:57 +0000
commitab2f5d80c1aa37b18307c8be24cd6e0a9804fa6c (patch)
tree3b1de6d8ad5f6a5c4afe0a62b1e42cbb44f36841 /lib/libdisk
parent573c81341201f5525f95a1366f8632133ced3666 (diff)
downloadFreeBSD-src-ab2f5d80c1aa37b18307c8be24cd6e0a9804fa6c.zip
FreeBSD-src-ab2f5d80c1aa37b18307c8be24cd6e0a9804fa6c.tar.gz
Zero memory after malloc. This stops sysinstall from dumping core
during disk probing with malloc debugging enabled. MFC after: 1 week
Diffstat (limited to 'lib/libdisk')
-rw-r--r--lib/libdisk/disk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libdisk/disk.c b/lib/libdisk/disk.c
index 24b2bfa..bd74009 100644
--- a/lib/libdisk/disk.c
+++ b/lib/libdisk/disk.c
@@ -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;
OpenPOWER on IntegriCloud