Hi,

Stefan Beller wrote:

> --- a/submodule-config.c
> +++ b/submodule-config.c
> @@ -251,18 +235,19 @@ static int parse_config(const char *var, const char 
> *value, void *data)
>  {
>       struct parse_config_parameter *me = data;
>       struct submodule *submodule;
> -     struct strbuf name = STRBUF_INIT, item = STRBUF_INIT;
> -     int ret = 0;
> +     int subsection_len, ret = 0;
> +     const char *subsection, *key;
>  
> -     /* this also ensures that we only parse submodule entries */
> -     if (!name_and_item_from_var(var, &name, &item))
> +     if (parse_config_key(var, "submodule", &subsection,
> +                          &subsection_len, &key) < 0 || !subsection)
>               return 0;
>  
> +     subsection = xmemdupz(subsection, subsection_len);

This appears to be leaked.

Thanks,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to