Please sign in to comment.
fixup! Win32: add a cache below mingw's lstat and dirent implementations
fscache_clear was crashing because when using hashmap_iter_next method the next entry will be saved. Meanwhile the call to fscache_release will free the directory and the list of entries for the directory. This causes the next entry saved by the iter to be freed, invalid and the crash with the next loop iteration. This changes the clear to simple call hashmap_free to free the hashmap and all the entries and then call hashmap_init to reinitialize the hashmap for the next fscache use. The reason this is safe is fscache_clear is only called from fscache_enable when this cache is being disabled which is only called in preload_index after all the thread have exited. It is also guarded by the critical section mutex. Signed-off-by: Kevin Willford <email@example.com> Signed-off-by: Johannes Schindelin <firstname.lastname@example.org>
- Loading branch information...