summaryrefslogtreecommitdiff
path: root/src/refspec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/refspec.c')
-rw-r--r--src/refspec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/refspec.c b/src/refspec.c
index 5567301f3..bd69f58ae 100644
--- a/src/refspec.c
+++ b/src/refspec.c
@@ -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);
}