Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Dec 2009 13:45:21 +0000 (UTC)
From:      Shteryana Shopova <syrinx@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r200122 - head/usr.sbin/bsnmpd/modules/snmp_pf
Message-ID:  <200912051345.nB5DjLVW089206@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: syrinx
Date: Sat Dec  5 13:45:21 2009
New Revision: 200122
URL: http://svn.freebsd.org/changeset/base/200122

Log:
  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

Modified:
  head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c

Modified: head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
==============================================================================
--- head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c	Sat Dec  5 13:40:51 2009	(r200121)
+++ head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c	Sat Dec  5 13:45:21 2009	(r200122)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912051345.nB5DjLVW089206>