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:40:12 +0000 (13:40 -0500)
commit37971728a5fc40b1c90512e79e47333d98ec8851
tree2a933da7e9831fa02e097cf03d6edf87863a8724
parent7307d60063ee4303da4de45f9d984fdc8df92146
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