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:
authorRémi Duraffort <ivoire@videolan.org>2013-07-15 18:00:00 +0400
committerRémi Duraffort <ivoire@videolan.org>2013-07-15 18:29:13 +0400
commit050af8bbe08b7cab7bfce044dcb51fb61ff1dc41 (patch)
tree28afcf712b7f1b96b64def4cbc17b7ac04a11cbf /src/pack-objects.c
parent8d6ef4bf78cc5d3a3cb277ecc4fcf0fdcdbc9f20 (diff)
pack: fix memory leak in error path
Diffstat (limited to 'src/pack-objects.c')
-rw-r--r--src/pack-objects.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pack-objects.c b/src/pack-objects.c
index 500104c55..7f427e3bd 100644
--- a/src/pack-objects.c
+++ b/src/pack-objects.c
@@ -505,8 +505,10 @@ static git_pobject **compute_write_order(git_packbuilder *pb)
/*
* Mark objects that are at the tip of tags.
*/
- if (git_tag_foreach(pb->repo, &cb_tag_foreach, pb) < 0)
+ if (git_tag_foreach(pb->repo, &cb_tag_foreach, pb) < 0) {
+ git__free(wo);
return NULL;
+ }
/*
* Give the objects in the original recency order until