Bug 179832 - manual page of mac_from_text suggests incorrect freeing of mac_t type
Summary: manual page of mac_from_text suggests incorrect freeing of mac_t type
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2013-06-22 09:20 UTC by Priit Järv
Modified: 2018-04-10 23:01 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Priit Järv 2013-06-22 09:20:00 UTC
manual page of mac_from_text(3) notes that the allocated storage should be freed with free(). I strongly suspect this is incorrect, as the type mac_t points to a structure which itself contains a pointer.

It seems this was introduced in svn rev 122777 where "mac_free(3)" was changed to "free(3)". It seems the specific change was meant for the mac_to_text() function call (a char* pointer indeed should be freed with free()).

Reported for 9.1-RELEASE but still present in head/stable.


Replace the text "which must later be freed with free(3)" with "which must later be freed with mac_free(3)". Additionally, it may be useful to mention in the next section that the text pointer allocated by mac_to_text() should be freed with free() - that seems to have been the intent of commit r122777.
How-To-Repeat: man mac_text
Comment 1 Tom Rhodes freebsd_committer 2014-01-08 20:10:21 UTC
Responsible Changed
From-To: freebsd-doc->rwatson

Over to Robert.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:16 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped