From owner-svn-src-all@FreeBSD.ORG Mon Aug 4 00:51:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B43F38B5 for ; Mon, 4 Aug 2014 00:51:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C00525F8 for ; Mon, 4 Aug 2014 00:51:57 +0000 (UTC) Received: from pfg (uid 1275) (envelope-from pfg@FreeBSD.org) id 5d30 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 04 Aug 2014 00:51:57 +0000 From: Pedro F. Giffuni Date: Mon, 4 Aug 2014 00:51:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r269491 - stable/10/lib/libc/stdlib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53ded92d.5d30.24eb2c6b@svn.freebsd.org> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2014 00:51:57 -0000 Author: pfg Date: Mon Aug 4 00:51:57 2014 New Revision: 269491 URL: http://svnweb.freebsd.org/changeset/base/269491 Log: 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 Modified: stable/10/lib/libc/stdlib/hcreate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/hcreate.c ============================================================================== --- stable/10/lib/libc/stdlib/hcreate.c Sun Aug 3 22:59:47 2014 (r269490) +++ stable/10/lib/libc/stdlib/hcreate.c Mon Aug 4 00:51:57 2014 (r269491) @@ -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); } }