]> git.hungrycats.org Git - linux/commit
[PATCH] Fix memory leak in epoll
authorJerzy Szczepkowski <js189202@zodiac.mimuw.edu.pl>
Tue, 6 Jul 2004 16:20:10 +0000 (09:20 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 6 Jul 2004 16:20:10 +0000 (09:20 -0700)
commitc105abb358d74cc256736ab3e9ef760544a525f5
tree60e6110c1331d1d378838750885b5240f955a23d
parent6173a1137439f0b998c4a2a945fd07b2b873510d
[PATCH] Fix memory leak in epoll

There was a memory leak in epoll.

The reference count (d_count) of the struct dentry of a new epoll-fd was
set to TWO.  (new_inode() assigned ONE, than ep_getfd() incremented it by
dget()).  There was only ONE reference to this dentry, so struct dentry and
struct inode were never freed.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/eventpoll.c