Fix segmentation fault if writing to audit log fails

If concurrent audit logging is enabled (SecAuditLogType Concurrent) a
segmentation fault occurs if writing to the log fails.