Skip to content

Commit

Permalink
sunrpc: fix memory leak in unix_gid cache.
Browse files Browse the repository at this point in the history
When we look up an entry in the uid->gidlist cache, we take
a reference to the content but don't drop the reference to the
cache entry.  So it never gets freed.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
NeilBrown authored and J. Bruce Fields committed Aug 4, 2009
1 parent 989a19b commit 560ab42
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/sunrpc/svcauth_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ static int unix_gid_find(uid_t uid, struct group_info **gip,
case 0:
*gip = ug->gi;
get_group_info(*gip);
cache_put(&ug->h, &unix_gid_cache);
return 0;
default:
return -EAGAIN;
Expand Down

0 comments on commit 560ab42

Please sign in to comment.