aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/database.cc
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2011-01-15 14:01:43 -0800
committerGravatar Carl Worth <cworth@cworth.org>2011-01-15 15:37:43 -0800
commit8bef9ba9220956beb8ff634c16344fb00689b973 (patch)
tree74a373e9533f7fbd2a10ed8512a65e9dee0f78b3 /lib/database.cc
parent36161181df961bb09da8090c13c234145270e5bf (diff)
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).
Diffstat (limited to 'lib/database.cc')
-rw-r--r--lib/database.cc2
1 files changed, 1 insertions, 1 deletions
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);