From owner-svn-src-head@FreeBSD.ORG Tue Feb 10 20:45:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F394D82; Tue, 10 Feb 2015 20:45:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE134651; Tue, 10 Feb 2015 20:45:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AKjeBS011230; Tue, 10 Feb 2015 20:45:40 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AKjemC011229; Tue, 10 Feb 2015 20:45:40 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201502102045.t1AKjemC011229@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 10 Feb 2015 20:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278530 - head/lib/libc/nls X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 20:45:41 -0000 Author: bdrewery Date: Tue Feb 10 20:45:40 2015 New Revision: 278530 URL: https://svnweb.freebsd.org/changeset/base/278530 Log: When catopen(3) returns an error, it caches the result of that error from r202992. The refcount on the cache entry is not initialized, so any attempt to clean the cache will skip over this item since it likely has a >0 value. This change is currently a NOP. There is work in progress to support freeing the cache which requires this change to avoid a memory leak. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/nls/msgcat.c Modified: head/lib/libc/nls/msgcat.c ============================================================================== --- head/lib/libc/nls/msgcat.c Tue Feb 10 19:41:30 2015 (r278529) +++ head/lib/libc/nls/msgcat.c Tue Feb 10 20:45:40 2015 (r278530) @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); np->name = strdup(n); \ np->path = NULL; \ np->catd = NLERR; \ + np->refcount = 0; \ np->lang = (l == NULL) ? NULL : \ strdup(l); \ np->caterrno = e; \