aboutsummaryrefslogtreecommitdiffstats
path: root/branch.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-30 11:13:24 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-30 11:23:03 -0700
commit666643fa89e4386c0f4eabd1112e8b3af0cb9cc1 (patch)
tree4bae05b501fa4eed53e7641520a2cef439923e1d /branch.c
parentc75841687b39f4c62fba56bde08653591b9c2149 (diff)
downloadgit-666643fa89e4386c0f4eabd1112e8b3af0cb9cc1.tar.gz
wt-status: fix leaking buffer with sparse directories
When hitting a sparse directory in `wt_status_collect_changes_initial()` we use a `struct strbuf` to assemble the directory's name. We never free that buffer though, causing a memory leak. Fix the leak by releasing the buffer. While at it, move the buffer outside of the loop and reset it to save on some wasteful allocations. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'branch.c')
0 files changed, 0 insertions, 0 deletions