The m_label_alloc(), m_label_dup(), and m_label_free() routines are used to allocate and free memory for labels. The following routine descriptions include the prototype declaration for each routine:
The m_label_alloc() routine allocates a label in an m_label_t data structure on the heap. Labels must be allocated before calling routines such as getlabel() and fgetlabel(). Some routines, such as str_to_label(), automatically allocate an m_label_t structure.
When you create a label by using the m_label_alloc() routine, you can set the label type to be a sensitivity label or a clearance label.
The m_label_dup() routine duplicates a label.
The m_label_free() routine frees the memory that was allocated for a label.
When you allocate an m_label_t structure or when you call another routine that automatically allocates an m_label_t structure, you are responsible for freeing the allocated memory. The m_label_free() routine frees the allocated memory.
See the m_label(3TSOL) man page.