mawww/kakoune — pull request #91 by jjthrash (2014-04-05 22:00:04+00:00)
Title: Fix closedir crash

Related to issue: https://github.com/mawww/kakoune/issues/90

Not sure if this fits your code style, but it appears to fix the problem.