Fix a memory leak in `git_pathspec__vinit`.
diff --git a/src/pathspec.c b/src/pathspec.c
index bad8dac..d6ce09c 100644
--- a/src/pathspec.c
+++ b/src/pathspec.c
@@ -89,8 +89,10 @@ int git_pathspec__vinit(
if (ret == GIT_ENOTFOUND) {
git__free(match);
continue;
- } else if (ret < 0)
+ } else if (ret < 0) {
+ git__free(match);
return ret;
+ }
if (git_vector_insert(vspec, match) < 0)
return -1;