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>

Jeff King committed Nov 22, 2018 at 12:53 UTC 7317aa7153c063a01750cda625e1a4580af89ef3
1 file changed +1
sha1-file.c
+1
@@ -2169,6 +2169,7 @@ void odb_load_loose_cache(struct object_directory *odb, int subdir_nr)
2169 NULL, NULL,
2170 &odb->loose_objects_cache);
2171 odb->loose_objects_subdir_seen[subdir_nr] = 1;
2172 + strbuf_release(&buf);
2173 }
2174
2175 static int check_stream_sha1(git_zstream *stream,