PERFORCE change 127430 for review

Christian S.J. Peron csjp at FreeBSD.org
Fri Oct 12 06:38:46 PDT 2007


http://perforce.freebsd.org/chv.cgi?CH=127430

Change 127430 by csjp at push on 2007/10/12 13:38:17

	getauevnonam() returns a pointer to statically defined stack
	allocated storage.  Calling free() on this pointer result in
	a memory fault crashing auditreduce.  This change fixes -m
	when the user specifies an event name.

Affected files ...

.. //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#20 edit

Differences ...

==== //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#20 (text+ko) ====

@@ -26,7 +26,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#19 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#20 $
  */
 
 /* 
@@ -722,7 +722,6 @@
 				if (n == NULL)
 					usage("Incorrect event name");
 				p_evtype = *n;
-				free(n);
 			}
 			SETOPT(opttochk, OPT_m);
 			break;


More information about the p4-projects mailing list