svn commit: r253078 - head/sys/security/audit

Andriy Gapon avg at FreeBSD.org
Tue Jul 9 09:03:02 UTC 2013


Author: avg
Date: Tue Jul  9 09:03:01 2013
New Revision: 253078
URL: http://svnweb.freebsd.org/changeset/base/253078

Log:
  audit_proc_coredump: check return value of audit_new
  
  audit_new may return NULL if audit is disabled or suspended.
  
  Sponsored by:	HybridCluster
  MFC after:	7 days

Modified:
  head/sys/security/audit/audit.c

Modified: head/sys/security/audit/audit.c
==============================================================================
--- head/sys/security/audit/audit.c	Tue Jul  9 09:01:44 2013	(r253077)
+++ head/sys/security/audit/audit.c	Tue Jul  9 09:03:01 2013	(r253078)
@@ -701,6 +701,8 @@ audit_proc_coredump(struct thread *td, c
 	 * (signal) tokens.
 	 */
 	ar = audit_new(AUE_CORE, td);
+	if (ar == NULL)
+		return;
 	if (path != NULL) {
 		pathp = &ar->k_ar.ar_arg_upath1;
 		*pathp = malloc(MAXPATHLEN, M_AUDITPATH, M_WAITOK);


More information about the svn-src-head mailing list