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
This commit is contained in:
parent
44c288e149
commit
f4ecb1058b
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user