fs: Fix searchdir resource leak
authorShao Miller <sha0.miller@gmail.com>
Fri, 2 Nov 2012 15:59:10 +0000 (11:59 -0400)
committerShao Miller <sha0.miller@gmail.com>
Thu, 29 Nov 2012 18:51:22 +0000 (13:51 -0500)
commit57acc34bdf83fc5ea08dbf44b74a5dd2c1131187
tree4ffa1ea082f1f3cbb20f735b4c8e974bd5c2284f
parent2080029baa13b5b8d8b94ae1dc27ce4ea82b5397
fs: Fix searchdir resource leak

This is a significant rewrite of the generic lookup logic inside
core/fs/fs.c's searchdir function.  Previously, there was a
memory leak if a path involved multiple directories.  After a
sufficiently large number of invocations, this could be observed.

Reported-by: Ady <ady-sf@hotmail.com>
Signed-off-by: Shao Miller <sha0.miller@gmail.com>
core/fs/fs.c