diff options
-rw-r--r-- | sha1_file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sha1_file.c b/sha1_file.c index bf1bdbcdf5..7ea7a93359 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -3356,12 +3356,12 @@ static int for_each_file_in_obj_subdir(int subdir_nr, break; } } - strbuf_setlen(path, baselen); + closedir(dir); + strbuf_setlen(path, baselen); if (!r && subdir_cb) r = subdir_cb(subdir_nr, path->buf, data); - closedir(dir); return r; } |