Re: [PATCH 3/7] indexopts: avoid a memleak in the error path

Subject: Re: [PATCH 3/7] indexopts: avoid a memleak in the error path

Date: Sun, 25 Jan 2026 09:23:25 +0900

To: Anton Khirnov, notmuch@notmuchmail.org

Cc:

From: David Bremner


Anton Khirnov <anton@khirnov.net> writes:

> ---
>  lib/indexopts.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/indexopts.c b/lib/indexopts.c
> index 6ced1181..8e497ba8 100644
> --- a/lib/indexopts.c
> +++ b/lib/indexopts.c
> @@ -39,7 +39,7 @@ notmuch_database_get_default_indexopts (notmuch_database_t *db)
>      notmuch_status_t err = notmuch_database_get_config (db, "index.decrypt", &decrypt_policy);
>  
>      if (err)
> -	return NULL;
> +	goto FAIL;
>  

This would be slightly nicer as a complete fix that could be applied
right away, rather than depending on adding FAIL in a previous patch.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: