diff options
author | avg <avg@FreeBSD.org> | 2013-07-09 09:03:01 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2013-07-09 09:03:01 +0000 |
commit | f4ecb1058bf702e646c8b34e022d65fdb6f407ff (patch) | |
tree | 703e21340bd3aa663c2dc52dab5bdc89383b8f4e /sys/security/audit | |
parent | 44c288e1496cf711ed470b921a3dc028c75fffe3 (diff) | |
download | FreeBSD-src-f4ecb1058bf702e646c8b34e022d65fdb6f407ff.zip FreeBSD-src-f4ecb1058bf702e646c8b34e022d65fdb6f407ff.tar.gz |
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
Diffstat (limited to 'sys/security/audit')
-rw-r--r-- | sys/security/audit/audit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/security/audit/audit.c b/sys/security/audit/audit.c index cb3406d..f2a01dd 100644 --- a/sys/security/audit/audit.c +++ b/sys/security/audit/audit.c @@ -701,6 +701,8 @@ audit_proc_coredump(struct thread *td, char *path, int errcode) * (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); |