Skip to content
Permalink
Browse files

fixup! diff: munmap() file contents before running external diff

  • Loading branch information...
dscho committed Oct 5, 2017
1 parent cd8b22d commit 34c1a976dcdaa107499f5c0c1c416bcfee477f94
Showing with 2 additions and 2 deletions.
  1. +2 −2 diff.c
4 diff.c
@@ -3094,9 +3094,9 @@ static void run_external_diff(const char *pgm,
argv_array_pushf(&env, "GIT_DIFF_PATH_COUNTER=%d", ++o->diff_path_counter);
argv_array_pushf(&env, "GIT_DIFF_PATH_TOTAL=%d", q->nr);

if (one->should_munmap)
if (one && one->should_munmap)
diff_free_filespec_data(one);
if (two->should_munmap)
if (two && two->should_munmap)
diff_free_filespec_data(two);
if (run_command_v_opt_cd_env(argv.argv, RUN_USING_SHELL, NULL, env.argv))
die(_("external diff died, stopping at %s"), name);

0 comments on commit 34c1a97

Please sign in to comment.
You can’t perform that action at this time.