HomeFreeBSD

audit(4): fix Coverity issues

Description

audit(4): fix Coverity issues

Fix several incorrect buffer size arguments and a file descriptor leak.

Submitted by: aniketp
Reported by: Coverity
CID: 1393489 1393501 1393509 1393510 1393514 1393515 1393516
CID: 1393517 1393518 1393519
MFC after: 2 weeks
X-MFC-With: 335284
X-MFC-With: 335318
X-MFC-With: 335320
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D16000