From c9b899f968b509db8ce06336907ed378df76b59f Mon Sep 17 00:00:00 2001 From: syrinx Date: Sat, 5 Dec 2009 13:45:21 +0000 Subject: Make sure enough memory is allocated for a struct pft_entry when refreshing the list of pf tables. OKed by: philip MFC after: 1 week --- usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/bsnmpd') diff --git a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c index 919e5d4..4e554c0 100644 --- a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c +++ b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c @@ -1104,7 +1104,7 @@ pft_refresh(void) } for (i = 0; i < numtbls; i++) { - e = malloc(sizeof(struct pfr_tstats)); + e = malloc(sizeof(struct pft_entry)); if (e == NULL) goto err1; e->index = i + 1; -- cgit v1.1