projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d080b41
)
lib: fix memory leak of field processor objects
author
David Bremner
<david@tethera.net>
Fri, 10 Jun 2016 02:35:27 +0000
(23:35 -0300)
committer
David Bremner
<david@tethera.net>
Fri, 10 Jun 2016 12:20:22 +0000
(09:20 -0300)
The field processor objects need to be deallocated explicitly just like
the range processors (or a talloc destructor defined).
lib/database.cc
patch
|
blob
|
history
diff --git
a/lib/database.cc
b/lib/database.cc
index 2b2d8219d29e5e963517b2a9c5219dec56be83dc..afafe88cc08cfd6234f80309bb9ba6d7ae02c874 100644
(file)
--- 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;
}