Fix fd/inode leak
authorNikolaus Rath <Nikolaus@rath.org>
Tue, 27 Nov 2018 20:58:36 +0000 (20:58 +0000)
committerNikolaus Rath <Nikolaus@rath.org>
Tue, 27 Nov 2018 20:58:36 +0000 (20:58 +0000)
commitd4a7ba44b022e3b63fc215374d87ed9e930d9974
tree7b99187a746092c72b39e9e323bbe9a7eecb4750
parentd1ab94c3551ebdeb4fbfbd12db930f4c20a3a889
Fix fd/inode leak

If do_readdir() calls do_lookup(), but the latter fails, we still have
to return any entries that we already stored in the readdir buffer to
avoid leaking inodes.

do_lookup() may fail if e.g. we reach the file descriptor limit.
example/passthrough_ll.c