summaryrefslogtreecommitdiff
path: root/src/pack.c
diff options
context:
space:
mode:
authorJacques Germishuys <jacquesg@striata.com>2014-12-24 11:42:50 +0200
committerJacques Germishuys <jacquesg@striata.com>2014-12-29 18:18:49 +0200
commit6f73e02605f57db20b8713053d55fef4b534f07b (patch)
tree9dc9140be76f4f627cf20a648c5d509ffe27542c /src/pack.c
parent5692dcf181d26069d68d460fc9179c8c96fa3795 (diff)
downloadlibgit2-6f73e02605f57db20b8713053d55fef4b534f07b.tar.gz
Plug some leaks
Diffstat (limited to 'src/pack.c')
-rw-r--r--src/pack.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pack.c b/src/pack.c
index df2563101..47ce854c4 100644
--- a/src/pack.c
+++ b/src/pack.c
@@ -158,6 +158,7 @@ static int cache_add(git_pack_cache *cache, git_rawobj *base, git_off_t offset)
if (entry) {
if (git_mutex_lock(&cache->lock) < 0) {
giterr_set(GITERR_OS, "failed to lock cache");
+ git__free(entry);
return -1;
}
/* Add it to the cache if nobody else has */