From owner-svn-src-head@FreeBSD.ORG Tue May 8 19:47:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AF05106566B; Tue, 8 May 2012 19:47:53 +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 56A808FC08; Tue, 8 May 2012 19:47:53 +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 q48Jlraw049567; Tue, 8 May 2012 19:47:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q48Jlr78049565; Tue, 8 May 2012 19:47:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205081947.q48Jlr78049565@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 8 May 2012 19:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235143 - head/lib/libc/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 08 May 2012 19:47:53 -0000 Author: kib Date: Tue May 8 19:47:52 2012 New Revision: 235143 URL: http://svn.freebsd.org/changeset/base/235143 Log: Plug a leak. Submitted by: Greg Bednarek MFC after: 1 week Modified: head/lib/libc/rpc/auth_unix.c Modified: head/lib/libc/rpc/auth_unix.c ============================================================================== --- head/lib/libc/rpc/auth_unix.c Tue May 8 19:43:32 2012 (r235142) +++ head/lib/libc/rpc/auth_unix.c Tue May 8 19:47:52 2012 (r235143) @@ -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); } /*