mirror of
https://github.com/git/git
synced 2024-10-06 00:29:28 +00:00
submodule--helper: fix "errmsg_str" memory leak
Fix a memory leak introduced in e83e3333b5
(submodule: port submodule
subcommand 'summary' from shell to C, 2020-08-13), we sometimes append
to the "errmsg", and need to free the "struct strbuf".
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
87a683482a
commit
61adac6c4b
|
@ -973,6 +973,7 @@ static void generate_submodule_summary(struct summary_cb *info,
|
||||||
free(displaypath);
|
free(displaypath);
|
||||||
free(src_abbrev);
|
free(src_abbrev);
|
||||||
free(dst_abbrev);
|
free(dst_abbrev);
|
||||||
|
strbuf_release(&errmsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare_submodule_summary(struct summary_cb *info,
|
static void prepare_submodule_summary(struct summary_cb *info,
|
||||||
|
|
Loading…
Reference in a new issue