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>
This commit is contained in:

committed by
Junio C Hamano

parent
94aa96cd59
commit
889c597961
4
help.c
4
help.c
@ -723,6 +723,10 @@ const char *help_unknown_cmd(const char *cmd)
|
|||||||
(float)cfg.autocorrect/10.0, assumed);
|
(float)cfg.autocorrect/10.0, assumed);
|
||||||
sleep_millisec(cfg.autocorrect * 100);
|
sleep_millisec(cfg.autocorrect * 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmdnames_release(&cfg.aliases);
|
||||||
|
cmdnames_release(&main_cmds);
|
||||||
|
cmdnames_release(&other_cmds);
|
||||||
return assumed;
|
return assumed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user