au_free_token3
Deallocate a token_t created by any of the au_to_*() bsm api functions
Usage
#include <bsm/libbsm.h>
void
au_free_token(token_t *tok);
Library
library “libbsm”
Overview
The BSM API generally manages deallocation of token_t objects. However, if au_write(3) is passed a bad audit descriptor, the token_t * parameter will be left untouched. In that case, the caller can deallocate the token_t using au_free_token() if desired.
The tok argument is a token_t * generated by one of the au_to_*() BSM API calls. For convenience, tok may be NULL, in which case au_free_token() returns immediately.
Implementation notes
This is, in fact, what audit_write(3) does, in keeping with the existing memory management model of the BSM API.
Releases
47 releases since FreeBSD 6.2-RELEASE; the text changed 3 times.