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:
authorRussell Belfer <rb@github.com>2013-06-11 01:16:56 +0400
committerRussell Belfer <rb@github.com>2013-06-11 01:16:56 +0400
commit2f77d8f15d7c71a92f01850025c91dffe3bcafd4 (patch)
tree1ea1270e5fefce2a1f73b2105df7cfa635f46a22 /src/remote.c
parent596b121ae46554cf48b4e561541e1ab975dbef78 (diff)
Fix some memory leaks
Diffstat (limited to 'src/remote.c')
-rw-r--r--src/remote.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/remote.c b/src/remote.c
index 943b72bb7..0e8354a11 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -1267,8 +1267,10 @@ static int rename_remote_references(
return -1;
while ((error = git_reference_next(&ref, iter)) == 0) {
- if (git__prefixcmp(ref->name, GIT_REFS_REMOTES_DIR))
+ if (git__prefixcmp(ref->name, GIT_REFS_REMOTES_DIR)) {
+ git_reference_free(ref);
continue;
+ }
if ((error = rename_one_remote_reference(ref, old_name, new_name)) < 0) {
git_reference_iterator_free(iter);