summaryrefslogtreecommitdiff
path: root/sha1-file.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-11-22 17:53:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-24 02:13:24 (GMT)
commit7317aa7153c063a01750cda625e1a4580af89ef3 (patch)
tree79915bba42c4c2e6fbc95cc00dd2c5e4e8423f8f /sha1-file.c
parent97b2fa08b6b9ee3ebd927bbc208bf5223e5ac849 (diff)
downloadgit-7317aa7153c063a01750cda625e1a4580af89ef3.zip
git-7317aa7153c063a01750cda625e1a4580af89ef3.tar.gz
git-7317aa7153c063a01750cda625e1a4580af89ef3.tar.bz2
odb_load_loose_cache: fix strbuf leak
Commit 3a2e0824 ("object-store: provide helpers for loose_objects_cache", 2018-11-12) moved the cache-loading code from find_short_object_filename(), but forgot the line that releases the path strbuf. Reported-by: René Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1-file.c')
-rw-r--r--sha1-file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sha1-file.c b/sha1-file.c
index e53da0b..b8efc4f 100644
--- a/sha1-file.c
+++ b/sha1-file.c
@@ -2169,6 +2169,7 @@ void odb_load_loose_cache(struct object_directory *odb, int subdir_nr)
NULL, NULL,
&odb->loose_objects_cache);
odb->loose_objects_subdir_seen[subdir_nr] = 1;
+ strbuf_release(&buf);
}
static int check_stream_sha1(git_zstream *stream,