From owner-svn-src-stable@FreeBSD.ORG Tue May 15 09:09:15 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 637F91065672; Tue, 15 May 2012 09:09:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D2978FC08; Tue, 15 May 2012 09:09:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4F99FQV077499; Tue, 15 May 2012 09:09:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4F99FaH077497; Tue, 15 May 2012 09:09:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205150909.q4F99FaH077497@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 15 May 2012 09:09:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235466 - stable/9/lib/libc/rpc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 09:09:15 -0000 Author: kib Date: Tue May 15 09:09:14 2012 New Revision: 235466 URL: http://svn.freebsd.org/changeset/base/235466 Log: MFC r235143: Plug a leak. Modified: stable/9/lib/libc/rpc/auth_unix.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/auth_unix.c ============================================================================== --- stable/9/lib/libc/rpc/auth_unix.c Tue May 15 09:01:00 2012 (r235465) +++ stable/9/lib/libc/rpc/auth_unix.c Tue May 15 09:09:14 2012 (r235466) @@ -185,6 +185,7 @@ authunix_create(machname, uid, gid, len, AUTH * authunix_create_default() { + AUTH *auth; int ngids; long ngids_max; char machname[MAXHOSTNAMELEN + 1]; @@ -207,8 +208,10 @@ authunix_create_default() if (ngids > NGRPS) ngids = NGRPS; /* XXX: interface problem; those should all have been unsigned */ - return (authunix_create(machname, (int)uid, (int)gid, ngids, - (int *)gids)); + auth = authunix_create(machname, (int)uid, (int)gid, ngids, + (int *)gids); + free(gids); + return (auth); } /*