]> git.notmuchmail.org Git - notmuch/commitdiff
lib/config: fix memory leak
authorDavid Bremner <david@tethera.net>
Sat, 19 Jun 2021 00:59:44 +0000 (21:59 -0300)
committerDavid Bremner <david@tethera.net>
Fri, 25 Jun 2021 12:13:04 +0000 (09:13 -0300)
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

index 0ec66372dec7d2f2e7a0f30eede8db40c86c88d2..368ed6696cc9d69a4a56a1bdb480c014b2faae63 100644 (file)
@@ -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);
 }
 
 void