Re: [PATCH 2/2] lib/config: fix memory leak

Subject: Re: [PATCH 2/2] lib/config: fix memory leak

Date: Fri, 25 Jun 2021 09:46:05 -0300

To: notmuch@notmuchmail.org

Cc:

From: David Bremner


David Bremner <david@tethera.net> writes:

> This commit fixes a small memory leak (per iterator restart) by
> actually using the talloc context intended to be blown away on
> restart.
> ---
>  lib/config.cc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/config.cc b/lib/config.cc
> index 0ec66372..368ed669 100644
> --- a/lib/config.cc
> +++ b/lib/config.cc
> @@ -318,7 +318,7 @@ notmuch_config_values_valid (notmuch_config_values_t *values)
>  const char *
>  notmuch_config_values_get (notmuch_config_values_t *values)
>  {
> -    return talloc_strndup (values, values->iterator, values->tok_len);
> +    return talloc_strndup (values->children, values->iterator, values->tok_len);
>  }

applied to release and master

d
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: