libc: fix description issues in mac_text(3)/mac_free(3)

mac_text(3) as-written would seem to indicate that a `mac_t` should be
freed with free(3), but this isn't the case.  One can derive from
context from when the change was introduced and COMPATIBILITY that this
was intended to talk about *text in `mac_to_text`, so move the comment
there.

PR:		179832
Co-authored-by:	Priit Järv <priit cc ttu ee>
MFC after:	3 days
This commit is contained in:
Kyle Evans
2025-10-26 10:10:34 -05:00
parent a31d432264
commit 081218b7a2
2 changed files with 7 additions and 5 deletions
+2 -2
View File
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd September 21, 2023
.Dd October 26, 2025
.Dt MAC_FREE 3
.Os
.Sh NAME
@@ -85,7 +85,7 @@ is a complex structure in the
implementation,
.Fn mac_free
is specific to
.Vt mac_3 ,
.Vt mac_t ,
and must not be used to free the character strings returned from
.Fn mac_to_text .
Doing so may result in undefined behavior.
+5 -3
View File
@@ -28,7 +28,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd September 21, 2023
.Dd October 26, 2025
.Dt MAC_TEXT 3
.Os
.Sh NAME
@@ -52,14 +52,16 @@ into the internal policy label format
and places it in
.Fa *mac ,
which must later be freed with
.Xr free 3 .
.Xr mac_free 3 .
.Pp
The
.Fn mac_to_text
function allocates storage for
.Fa *text ,
which will be set to the text representation of
.Fa label .
.Fa label
and must later be freed with
.Xr free 3 .
.Pp
Refer to
.Xr maclabel 7