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:
authorCarlos Martín Nieto <cmn@dwim.me>2013-11-02 03:51:57 +0400
committerCarlos Martín Nieto <cmn@dwim.me>2013-11-11 18:35:52 +0400
commit1c967df31c9285af6eaea3c462314b4b88c2706a (patch)
tree6badfa8b4dd0724fd7a00289cd8b65119caf43b7 /src/fetch.c
parent359dce726d215be65aee719c7316b43e3851c031 (diff)
remote: fix a couple of leaks
Diffstat (limited to 'src/fetch.c')
-rw-r--r--src/fetch.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fetch.c b/src/fetch.c
index 19afddcd8..276591821 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -72,7 +72,10 @@ static int filter_wants(git_remote *remote)
if ((error = git_refspec__parse(&head, "HEAD", true)) < 0)
goto cleanup;
- if ((error = git_refspec__dwim_one(&remote->active_refspecs, &head, &remote->refs)) < 0)
+ error = git_refspec__dwim_one(&remote->active_refspecs, &head, &remote->refs);
+ git_refspec__free(&head);
+
+ if (error < 0)
goto cleanup;
}