From: David Bremner Date: Sat, 19 Jun 2021 00:59:44 +0000 (-0300) Subject: lib/config: fix memory leak X-Git-Tag: 0.32.2~3 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=35d559eb18d779822074a0781585642028e61ed8 lib/config: fix memory leak This commit fixes a small memory leak (per iterator restart) by actually using the talloc context intended to be blown away on restart. --- 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); } void