From owner-cvs-src@FreeBSD.ORG Sun May 15 04:47:41 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80F3916A4D0; Sun, 15 May 2005 04:47:41 +0000 (GMT) Received: from cheer.mahoroba.org (gw4.mahoroba.org [218.45.22.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D68243D41; Sun, 15 May 2005 04:47:40 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from lyrics.mahoroba.org (ume@lyrics.mahoroba.org [IPv6:3ffe:501:185b:8010:280:88ff:fe03:4841]) (user=ume mech=CRAM-MD5 bits=0)j4F4lMDu088562 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 15 May 2005 13:47:23 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sun, 15 May 2005 13:47:20 +0900 Message-ID: From: Hajimu UMEMOTO To: Craig Rodrigues In-Reply-To: <20050515030130.GA63641@crodrigues.org> References: <200505141403.j4EE3LYX097762@repoman.freebsd.org> <20050515030130.GA63641@crodrigues.org> User-Agent: xcite1.38> Wanderlust/2.15.1 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/22.0.50 (i386-unknown-freebsd5.4) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 5.4-STABLE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-2.0b5 (cheer.mahoroba.org [IPv6:3ffe:501:185b:8010::1]); Sun, 15 May 2005 13:47:23 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-5.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.3 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on cheer.mahoroba.org cc: cvs-src@freebsd.org cc: das@freebsd.org cc: src-committers@freebsd.org cc: Xin LI cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/libc/gen ttyname.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 May 2005 04:47:41 -0000 Hi, >>>>> On Sat, 14 May 2005 23:01:30 -0400 >>>>> Craig Rodrigues said: rodrigc> If you link code with -pthread (and __isthreaded=1), then rodrigc> in ttyname() in /usr/src/lib/libc/gen/ttyname.c, there rodrigc> is a malloc() called, but there is no corresponding free(). rodrigc> malloc() is never called if __isthreaded=0. No, it seems that free() is registered to call when a thread is finished: if (_pthread_key_create(&ttyname_key, free)) { _pthread_mutex_unlock(&ttyname_lock); return (NULL); } Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/