config: work around bug with includeif:onbranch and early config
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index 41469930102ff3f807576384a77be59bc26a8613..efe42b341ae15ebceb1e216518ab3a542be361dc 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -4209,6 +4209,8 @@ 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);
 
+       diff_free_filespec_data(one);
+       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);