From: David Bremner Date: Fri, 10 Jun 2016 02:35:27 +0000 (-0300) Subject: lib: fix memory leak of field processor objects X-Git-Tag: 0.23_rc0~93 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=4291f326809692bad61b50f942dc366e59ab30ef lib: fix memory leak of field processor objects The field processor objects need to be deallocated explicitly just like the range processors (or a talloc destructor defined). --- diff --git a/lib/database.cc b/lib/database.cc index 2b2d8219..afafe88c 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -1107,6 +1107,13 @@ notmuch_database_close (notmuch_database_t *notmuch) delete notmuch->last_mod_range_processor; notmuch->last_mod_range_processor = NULL; +#if HAVE_XAPIAN_FIELD_PROCESSOR + delete notmuch->date_field_processor; + notmuch->date_field_processor = NULL; + delete notmuch->query_field_processor; + notmuch->query_field_processor = NULL; +#endif + return status; }