mirror of
https://github.com/git/git.git
synced 2026-01-26 02:24:27 +00:00
difftool: close file descriptors after reading
Spotted by Coverity. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -226,6 +226,7 @@ static void changed_files(struct hashmap *result, const char *index_path,
|
||||
hashmap_entry_init(entry, strhash(buf.buf));
|
||||
hashmap_add(result, entry);
|
||||
}
|
||||
fclose(fp);
|
||||
if (finish_command(&diff_files))
|
||||
die("diff-files did not exit properly");
|
||||
strbuf_release(&index_env);
|
||||
@@ -456,6 +457,7 @@ static int run_dir_diff(const char *extcmd, int symlinks, const char *prefix,
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
if (finish_command(&child)) {
|
||||
ret = error("error occurred running diff --raw");
|
||||
goto finish;
|
||||
|
||||
Reference in New Issue
Block a user