summaryrefslogtreecommitdiff
path: root/builtin/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/add.c')
-rw-r--r--builtin/add.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/add.c b/builtin/add.c
index c20548e4f5..a648cf4c56 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -119,6 +119,7 @@ int add_files_to_cache(const char *prefix,
rev.diffopt.flags |= DIFF_OPT_OVERRIDE_SUBMODULE_CONFIG;
rev.max_count = 0; /* do not compare unmerged paths with stage #2 */
run_diff_files(&rev, DIFF_RACY_IS_MODIFIED);
+ clear_pathspec(&rev.prune_data);
return !!data.add_errors;
}
@@ -514,5 +515,7 @@ finish:
die(_("Unable to write new index file"));
}
+ UNLEAK(pathspec);
+ UNLEAK(dir);
return exit_status;
}