summaryrefslogtreecommitdiff
path: root/pathspec.c
diff options
context:
space:
mode:
Diffstat (limited to 'pathspec.c')
-rw-r--r--pathspec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pathspec.c b/pathspec.c
index 2774bda..74f0203 100644
--- a/pathspec.c
+++ b/pathspec.c
@@ -372,3 +372,9 @@ void copy_pathspec(struct pathspec *dst, const struct pathspec *src)
memcpy(dst->items, src->items,
sizeof(struct pathspec_item) * dst->nr);
}
+
+void free_pathspec(struct pathspec *pathspec)
+{
+ free(pathspec->items);
+ pathspec->items = NULL;
+}