]> git.neil.brown.name Git - history.git/commit
[PATCH] sysfs: fix sysfs_dir_close memory leak
authorGreg Kroah-Hartman <greg@kroah.com>
Fri, 3 Dec 2004 04:40:55 +0000 (20:40 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 3 Dec 2004 04:40:55 +0000 (20:40 -0800)
commit2cbba4826722baf7b0c9fae1c01949885384feea
treebe3ab5a736f169ae998751218b0255cb8bbe9e77
parentea2e10e57a47bc786f37f3737d35f0144ac06d45
[PATCH] sysfs: fix sysfs_dir_close memory leak

sysfs_dir_close did not free the "cursor" sysfs_dirent used for keeping
track of position in the list of sysfs_dirent nodes.  Consequently,
doing a "find /sys" would leak a sysfs_dirent for each of the 1140
directories in my /sys tree, or about 36kB each time.

From: "Adam J. Richter" <adam@yggdrasil.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/sysfs/dir.c