Re: [PATCH v3 26/26] submodule--helper: fix a configure_added_submodule() leak
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 14 quoted lines
> static void configure_added_submodule(struct add_data *add_data)
> {
> char *key;
> - char *val = NULL;
> + const char *val;
> struct child_process add_submod = CHILD_PROCESS_INIT;
> struct child_process add_gitmodules = CHILD_PROCESS_INIT;
>
> @@ -3306,7 +3306,7 @@ static void configure_added_submodule(struct add_data *add_data)
> * is_submodule_active(), since that function needs to find
> * out the value of "submodule.active" again anyway.
> */
> - if (!git_config_get_string("submodule.active", &val)) {
> + if (!git_config_get_string_tmp("submodule.active", &val)) {