diff options
| author | Paul Tarjan <github@paulisageek.com> | 2026-04-15 13:27:26 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-04-15 08:44:32 -0700 |
| commit | e21be6cd45db554862f40c90b385c1bc465c8335 (patch) | |
| tree | 65ccebe6710d997a773d2c18cd73ae436c6b7d2e /git-commit-script | |
| parent | 7cce609e086866d054a1433d0356fa71e55c108d (diff) | |
fsmonitor: fix khash memory leak in do_handle_client
The `shown` kh_str_t was freed with kh_release_str() at a point in
the code only reachable in the non-trivial response path. When the
client receives a trivial response, the code jumps to the `cleanup`
label, skipping the kh_release_str() call entirely and leaking the
hash table.
Fix this by initializing `shown` to NULL and moving the cleanup to the
`cleanup` label using kh_destroy_str(), which is safe to call on NULL.
This ensures the hash table is freed regardless of which code path is
taken.
Signed-off-by: Paul Tarjan <github@paulisageek.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-commit-script')
0 files changed, 0 insertions, 0 deletions
