PreviousNext

sec_attr_util_inst_free(3sec)

Frees nonnull pointers in a sec_attr_t and the pointer to the sec_attr_t itself

Synopsis

#include <dce/sec_attr_util.h>

void sec_attr_util_inst_free (
sec_attr_t **sec_attr_p);

Parameters

Input/Output

**sec_attr_p
As input, the address of an allocated pointer to a potentially initialized sec_attr_t. As output, the address of a deallocated pointer that has been set to NULL.

Description
The sec_attr_util_inst_free( ) routine frees each nonnull pointer in a sec_attr_t pointed to by *sec_attr_p. The *sec_attr_p itself is also freed and set to NULL. A partially initialized sec_attr_t is handled correctly.

The sec_attr_util_inst_free( ) routine is useful for freeing the resources of dynamically allocated sec_attr_ts and their subfields.

Note that most DCE client application programming interfaces (APIs) that return sec_attr_ts allocate only subfields, and not the sec_attr_t itself. Use sec_attr_util_inst_free_ptrs( ) instead of sec_attr_util_inst_free( ) to free attribute resources allocated by such APIs.

Files

/usr/include/dce/sec_attr_util.idl
The idl file from which dce/sec_attr_util.h was derived.

Related Information
Functions:

sec_attr_util_inst_free_ptrs(3sec)