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>
This commit is contained in:
Jeff King 2018-11-22 12:53:00 -05:00 коммит произвёл Junio C Hamano
Родитель 97b2fa08b6
Коммит 7317aa7153
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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,