diff options
author | Rémi Duraffort <ivoire@videolan.org> | 2013-07-15 16:00:00 +0200 |
---|---|---|
committer | Rémi Duraffort <ivoire@videolan.org> | 2013-07-15 16:29:13 +0200 |
commit | 050af8bbe08b7cab7bfce044dcb51fb61ff1dc41 (patch) | |
tree | 28afcf712b7f1b96b64def4cbc17b7ac04a11cbf /src/pack-objects.c | |
parent | 8d6ef4bf78cc5d3a3cb277ecc4fcf0fdcdbc9f20 (diff) | |
download | libgit2-050af8bbe08b7cab7bfce044dcb51fb61ff1dc41.tar.gz |
pack: fix memory leak in error path
Diffstat (limited to 'src/pack-objects.c')
-rw-r--r-- | src/pack-objects.c | 4 |
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 |