closedir includes a free() call