From: Jeff King Date: Thu, 22 Nov 2018 17:53:00 +0000 (-0500) Subject: odb_load_loose_cache: fix strbuf leak X-Git-Tag: v2.21.0-rc0~132^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7317aa7153c063a01750cda625e1a4580af89ef3;p=thirdparty%2Fgit.git 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 Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- 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,