From: NeilBrown Date: Tue, 4 Aug 2009 05:22:39 +0000 (+1000) Subject: sunrpc: fix memory leak in unix_gid cache. X-Git-Tag: upstream/snapshot3+hdmi~17380^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=560ab42ef923aaf2e4347315bdfcc74b2708972c;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git sunrpc: fix memory leak in unix_gid cache. 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 Signed-off-by: J. Bruce Fields --- diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index 5c865e2..799ff6e 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c @@ -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;