[PATCH 1/3] query: bind queries to database objects

Felipe Contreras felipe.contreras at gmail.com
Mon Sep 30 09:28:41 PDT 2013


The queries don't really work after a database is closed, and we would
like them to be freed if the database is destroyed.

Signed-off-by: Felipe Contreras <felipe.contreras at gmail.com>
---
 lib/query.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/query.cc b/lib/query.cc
index 69668a4..ec60e2e 100644
--- a/lib/query.cc
+++ b/lib/query.cc
@@ -80,7 +80,7 @@ notmuch_query_create (notmuch_database_t *notmuch,
     if (_debug_query ())
 	fprintf (stderr, "Query string is:\n%s\n", query_string);
 
-    query = talloc (NULL, notmuch_query_t);
+    query = talloc (notmuch, notmuch_query_t);
     if (unlikely (query == NULL))
 	return NULL;
 
-- 
1.8.4-fc



More information about the notmuch mailing list