summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2014-08-04 00:51:57 +0000
committerpfg <pfg@FreeBSD.org>2014-08-04 00:51:57 +0000
commit503271002c5803fd0132e694d53f23d2f1784991 (patch)
treeee5d9349db817cae93ab068a4465ff8a8394ea89 /lib/libc
parent5cebaadbe0364ef48cde931e7e3abdff92ac693a (diff)
downloadFreeBSD-src-503271002c5803fd0132e694d53f23d2f1784991.zip
FreeBSD-src-503271002c5803fd0132e694d53f23d2f1784991.tar.gz
MFC r268945:
Fix hdestroy() compliance issue. The hcreate(3) implementation and related functions we inherited from NetBSD used to free() the key value, something that is not supported by the standard implementation. This would cause a segmentation fault when attempting to run the examples from the opengroup and linux manpages. There is no need to bump the __FreeBSD_version as we have always claimed XPG4.2 compliance but if some reference is required, the bump for r269484 can be used. Reference: http://bugs.dragonflybsd.org/issues/1398
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdlib/hcreate.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/libc/stdlib/hcreate.c b/lib/libc/stdlib/hcreate.c
index cfcd115..dfb4968 100644
--- a/lib/libc/stdlib/hcreate.c
+++ b/lib/libc/stdlib/hcreate.c
@@ -142,7 +142,6 @@ hdestroy(void)
while (!SLIST_EMPTY(&htable[idx])) {
ie = SLIST_FIRST(&htable[idx]);
SLIST_REMOVE_HEAD(&htable[idx], link);
- free(ie->ent.key);
free(ie);
}
}
OpenPOWER on IntegriCloud