From 40d7941322f2d64c9f5d9cb15a9dbb3d4d47d435 Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" Date: Mon, 4 Aug 2014 00:51:57 +0000 Subject: 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 --- lib/libc/stdlib/hcreate.c | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/libc/stdlib/hcreate.c') diff --git a/lib/libc/stdlib/hcreate.c b/lib/libc/stdlib/hcreate.c index cfcd11583be3c..dfb4968a1299e 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); } } -- cgit v1.2.3