diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-11-20 14:39:44 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-11-21 00:23:44 +0100 |
commit | 889c597961cb8dfc0255f520a270aafe125b9869 (patch) | |
tree | 43286fd27b5223368c6acdbec69bc930a2ba20e9 /help.c | |
parent | help: refactor to not use globals for reading config (diff) | |
download | git-889c597961cb8dfc0255f520a270aafe125b9869.tar.xz git-889c597961cb8dfc0255f520a270aafe125b9869.zip |
help: fix leaking `struct cmdnames`
We're populating multiple `struct cmdnames`, but don't ever free them.
Plug this memory leak.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'help.c')
-rw-r--r-- | help.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -723,6 +723,10 @@ const char *help_unknown_cmd(const char *cmd) (float)cfg.autocorrect/10.0, assumed); sleep_millisec(cfg.autocorrect * 100); } + + cmdnames_release(&cfg.aliases); + cmdnames_release(&main_cmds); + cmdnames_release(&other_cmds); return assumed; } |