Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Nov 2012 08:33:28 +0000 (UTC)
From:      Jaakko Heinonen <jh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r243477 - stable/7/lib/libc/rpc
Message-ID:  <201211240833.qAO8XSem006122@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jh
Date: Sat Nov 24 08:33:27 2012
New Revision: 243477
URL: http://svnweb.freebsd.org/changeset/base/243477

Log:
  MFC r235143 by kib:
  
  Plug a leak.
  
  PR:		167068
  Tested by:	Oliver Pinter

Modified:
  stable/7/lib/libc/rpc/auth_unix.c
Directory Properties:
  stable/7/lib/libc/   (props changed)

Modified: stable/7/lib/libc/rpc/auth_unix.c
==============================================================================
--- stable/7/lib/libc/rpc/auth_unix.c	Sat Nov 24 07:02:31 2012	(r243476)
+++ stable/7/lib/libc/rpc/auth_unix.c	Sat Nov 24 08:33:27 2012	(r243477)
@@ -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);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211240833.qAO8XSem006122>