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

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

Date: Sun, 12 Oct 2025 10:55:43 +0200

To: notmuch@notmuchmail.org

Cc:

From: Anton Khirnov


---
 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;
 
     if (decrypt_policy) {
 	if ((! (strcasecmp (decrypt_policy, "true"))) ||
-- 
2.47.3

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

Thread: