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);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to