summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-01-11 06:38:42 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-01-11 06:38:42 +0000
commita47132c529785bf8305ce4c99000eebf7ecf2209 (patch)
treed1e30128986d6aa0d4f6f99535c7044390a33bee /usr.sbin/snmpd
parent0ba010ae1ef3e0246ed01cbad16714780b943605 (diff)
use calloc() instead of multiplying for malloc(); ok reyk
Diffstat (limited to 'usr.sbin/snmpd')
-rw-r--r--usr.sbin/snmpd/mib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/snmpd/mib.c b/usr.sbin/snmpd/mib.c
index 4d3adeaef7c..3958b0c48f0 100644
--- a/usr.sbin/snmpd/mib.c
+++ b/usr.sbin/snmpd/mib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mib.c,v 1.32 2009/12/16 22:17:53 deraadt Exp $ */
+/* $OpenBSD: mib.c,v 1.33 2010/01/11 06:38:41 deraadt Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net>
@@ -723,7 +723,7 @@ kinfo_proc(u_int32_t idx, struct kinfo_proc2 **kinfo)
nkp = count;
}
- klist = malloc(count * sizeof(*klist));
+ klist = calloc(count, sizeof(*klist));
if (klist == NULL)
return (-1);