From a47132c529785bf8305ce4c99000eebf7ecf2209 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Mon, 11 Jan 2010 06:38:42 +0000 Subject: use calloc() instead of multiplying for malloc(); ok reyk --- usr.sbin/snmpd/mib.c | 4 ++-- 1 file 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 @@ -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); -- cgit v1.2.3