Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jul 2013 09:03:01 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r253078 - head/sys/security/audit
Message-ID:  <201307090903.r69931Qq024184@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



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