>Number: 179832 >Category: docs >Synopsis: manual page of mac_from_text suggests incorrect freeing of >mac_t type >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sat Jun 22 08:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Priit Järv >Release: 9.1-RELEASE (the problem persists in head/stable) >Organization: >Environment: FreeBSD test 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Sat May 11 16:22:59 EEST 2013 root@test:/usr/obj/usr/src/sys/MACTEST amd64 >Description: 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. >How-To-Repeat: man mac_text >Fix: 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. >Release-Note: >Audit-Trail: >Unformatted:
_______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-doc To unsubscribe, send any mail to "[email protected]"
