From 8bef9ba9220956beb8ff634c16344fb00689b973 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sat, 15 Jan 2011 14:01:43 -0800 Subject: [PATCH] Tighten up a memory allocation. Using the local talloc context ensures that the memory we are using here will be freed shortly, (rather than hanging on for a long time with the notmuch database object). --- lib/database.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/database.cc b/lib/database.cc index 7a00917e..289e41c4 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -1710,7 +1710,7 @@ notmuch_database_remove_message (notmuch_database_t *notmuch, if (status) return status; - term = talloc_asprintf (notmuch, "%s%s", prefix, direntry); + term = talloc_asprintf (local, "%s%s", prefix, direntry); find_doc_ids_for_term (notmuch, term, &i, &end); -- 2.43.0