summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd/mib.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/snmpd/mib.c')
-rw-r--r--usr.sbin/snmpd/mib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/snmpd/mib.c b/usr.sbin/snmpd/mib.c
index 1893e10fa2c..f92d2612d85 100644
--- a/usr.sbin/snmpd/mib.c
+++ b/usr.sbin/snmpd/mib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mib.c,v 1.68 2014/04/28 12:03:32 mikeb Exp $ */
+/* $OpenBSD: mib.c,v 1.69 2014/05/07 01:23:52 tedu Exp $ */
/*
* Copyright (c) 2012 Joel Knight <joel@openbsd.org>
@@ -2818,9 +2818,8 @@ mib_carpifget(u_int idx)
return (NULL);
}
- cif = malloc(sizeof(struct carpif));
+ cif = calloc(1, sizeof(struct carpif));
if (cif != NULL) {
- memset(cif, 0, sizeof(struct carpif));
memcpy(&cif->carpr, &carpr, sizeof(struct carpreq));
memcpy(&cif->kif, kif, sizeof(struct kif));
}