summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-05-08 19:47:52 +0000
committerkib <kib@FreeBSD.org>2012-05-08 19:47:52 +0000
commit27d9e6e27d8c85edaec9ab801a47cc7634349435 (patch)
tree38234e1b689adcb5866e25c5e188ec648bbc1cc6 /lib
parentda2bdbf902da11446319f6b31c848b3a946cb2ca (diff)
downloadFreeBSD-src-27d9e6e27d8c85edaec9ab801a47cc7634349435.zip
FreeBSD-src-27d9e6e27d8c85edaec9ab801a47cc7634349435.tar.gz
Plug a leak.
Submitted by: Greg Bednarek <gbednarek averesystems com> MFC after: 1 week
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/rpc/auth_unix.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libc/rpc/auth_unix.c b/lib/libc/rpc/auth_unix.c
index ff3ca7b..c0d2548 100644
--- a/lib/libc/rpc/auth_unix.c
+++ b/lib/libc/rpc/auth_unix.c
@@ -185,6 +185,7 @@ authunix_create(machname, uid, gid, len, aup_gids)
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);
}
/*
OpenPOWER on IntegriCloud