mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 22:25:04 +00:00
Merge pull request #1226 from nulltoken/fix/refspec_free
refspec: prevent git_refspec__free() from segfaulting
This commit is contained in:
commit
8ace41654b
@ -127,6 +127,9 @@ int git_refspec__parse(git_refspec *refspec, const char *input, bool is_fetch)
|
|||||||
|
|
||||||
void git_refspec__free(git_refspec *refspec)
|
void git_refspec__free(git_refspec *refspec)
|
||||||
{
|
{
|
||||||
|
if (refspec == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
git__free(refspec->src);
|
git__free(refspec->src);
|
||||||
git__free(refspec->dst);
|
git__free(refspec->dst);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user