diff options
author | Jeff King <peff@peff.net> | 2018-11-22 20:53:00 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-24 05:13:24 +0300 |
commit | 7317aa7153c063a01750cda625e1a4580af89ef3 (patch) | |
tree | 79915bba42c4c2e6fbc95cc00dd2c5e4e8423f8f /sha1-file.c | |
parent | 97b2fa08b6b9ee3ebd927bbc208bf5223e5ac849 (diff) |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sha1-file.c b/sha1-file.c index e53da0b701..b8efc4fc8e 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, |