Fix a memory leak in git_pathspec__vinit.

This commit is contained in:
Arthur Schreiber 2014-01-13 17:51:08 +01:00
parent be29dd82e2
commit 63170bcae9

View File

@ -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;