Skip to content

Commit 7317aa7

Browse files
peffgitster
authored andcommitted
odb_load_loose_cache: fix strbuf leak
Commit 3a2e082 ("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 <[email protected]> Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 97b2fa0 commit 7317aa7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sha1-file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,6 +2169,7 @@ void odb_load_loose_cache(struct object_directory *odb, int subdir_nr)
21692169
NULL, NULL,
21702170
&odb->loose_objects_cache);
21712171
odb->loose_objects_subdir_seen[subdir_nr] = 1;
2172+
strbuf_release(&buf);
21722173
}
21732174

21742175
static int check_stream_sha1(git_zstream *stream,

0 commit comments

Comments
 (0)