FreeBSD/sys/cddl/contrib/opensolaris/uts/common/os/fm.c
/*
 * Destroy a previously allocated nvlist structure.  flag indicates whether
 * or not the associated nva structure should be freed (FM_NVA_FREE) or
 * retained (FM_NVA_RETAIN).  Retaining the nv alloc structure allows
 * it to be re-used for future nvlist creation operations.
 */
Destroy a previously allocated nvlist structure.  flag indicates whether
or not the associated nva structure should be freed (FM_NVA_FREE) or
retained (FM_NVA_RETAIN).  Retaining the nv alloc structure allows
it to be re-used for future nvlist creation operations.
Destroy a previously allocated nvlist structure . flag indicates whether or not the associated nva structure should be freed ( FM_NVA_FREE ) or retained ( FM_NVA_RETAIN ) . Retaining the nv alloc structure allows it to be re - used for future nvlist creation operations .
void
fm_nvlist_destroy(nvlist_t *nvl, int flag)
{
	nv_alloc_t *nva = nvlist_lookup_nv_alloc(nvl);
	nvlist_free(nvl);
	if (nva != NULL) {
		if (flag == FM_NVA_FREE)
			fm_nva_xdestroy(nva);
	}
}
void fm_nvlist_destroy ( nvlist_t * nvl , int flag ) { nv_alloc_t * nva = nvlist_lookup_nv_alloc ( nvl ) ; nvlist_free ( nvl ) ; if ( nva != NULL ) { if ( flag == FM_NVA_FREE ) fm_nva_xdestroy ( nva ) ; } }
Destroy a previously allocated nvlist structure.
Destroy a previously allocated nvlist structure .