refspec: prevent git_refspec__free() from segfaulting

Fix libgit2/libgit2sharp#247
This commit is contained in:
nulltoken 2013-01-11 16:14:17 +01:00
parent 3a5e8faee7
commit a379e65212

View File

@ -127,6 +127,9 @@ int git_refspec__parse(git_refspec *refspec, const char *input, bool is_fetch)
void git_refspec__free(git_refspec *refspec)
{
if (refspec == NULL)
return;
git__free(refspec->src);
git__free(refspec->dst);
}