Commit 63170bca by Arthur Schreiber

Fix a memory leak in `git_pathspec__vinit`.

parent be29dd82
...@@ -89,8 +89,10 @@ int git_pathspec__vinit( ...@@ -89,8 +89,10 @@ int git_pathspec__vinit(
if (ret == GIT_ENOTFOUND) { if (ret == GIT_ENOTFOUND) {
git__free(match); git__free(match);
continue; continue;
} else if (ret < 0) } else if (ret < 0) {
git__free(match);
return ret; return ret;
}
if (git_vector_insert(vspec, match) < 0) if (git_vector_insert(vspec, match) < 0)
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment