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 <gbednarek averesystems com>
  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);
 }
 
 /*
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to