Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2013-01-11 19:14:17 +0400
committernulltoken <emeric.fermas@gmail.com>2013-01-11 19:14:17 +0400
commita379e652120d101d87b7225e5d2fe97031c0b69b (patch)
tree3b9cc687a965f5b28c666b62f01192aa43d34090 /src/refspec.c
parent3a5e8faee7f4e5ede2f938d8975261cc84e27383 (diff)
refspec: prevent git_refspec__free() from segfaulting
Fix libgit2/libgit2sharp#247
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);
}