Date: Wed, 10 Jun 2026 12:36:25 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 291240] Mistake in hcreate(3) manpage Message-ID: <bug-291240-227-aMgXIMnXBg@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-291240-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291240 --- Comment #1 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=ab8ceaaa86baa077fcdc020a0c05ccf88fcd54d1 commit ab8ceaaa86baa077fcdc020a0c05ccf88fcd54d1 Author: Kit Dallege <xaum.io@gmail.com> AuthorDate: 2026-03-27 01:57:10 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2026-06-10 12:35:05 +0000 hcreate(3): fix incorrect claim that hdestroy frees keys The man page incorrectly stated that hdestroy() calls free(3) for each comparison key. The implementation (hdestroy_r.c) only frees the internal table structure, not the user-provided keys or data. This matches POSIX, which says hdestroy "shall dispose of the search table" without mentioning key deallocation. Update the description to clarify that the caller is responsible for freeing any memory associated with table entries. PR: 291240 Signed-off-by: Kit Dallege <xaum.io@gmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2095 lib/libc/stdlib/hcreate.3 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-291240-227-aMgXIMnXBg>
