[ipfilter-cvs] ipfilter/lib walk_live_fr_rules.c,
Brought to you by:
darren_r
From: Darren <dar...@us...> - 2014-06-15 12:05:41
|
Update of /cvsroot/ipfilter/ipfilter/lib In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6282/lib Modified Files: walk_live_fr_rules.c Log Message: #548 ipfstat hits a bus error on netbsd/sparc64 Index: walk_live_fr_rules.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/lib/walk_live_fr_rules.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** walk_live_fr_rules.c 15 Jun 2012 08:33:08 -0000 1.3 --- walk_live_fr_rules.c 15 Jun 2014 12:05:38 -0000 1.4 *************** *** 66,75 **** continue; } ! if (fp->fr_data != NULL) ! fp->fr_data = (char *)fp + fp->fr_size; if (fp->fr_die != 0) fp->fr_die -= ticks; rules++; walker(fp); } --- 66,82 ---- continue; } ! if (fp->fr_data != NULL) { ! fp->fr_data = calloc(1, fp->fr_dsize); ! if (fp->fr_data != NULL) { ! bcopy((char *)fp + fp->fr_size, fp->fr_data, ! fp->fr_dsize); ! } ! } if (fp->fr_die != 0) fp->fr_die -= ticks; rules++; walker(fp); + if (fp->fr_data != NULL) + free(fp->fr_data); } |