projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3616118
)
Tighten up a memory allocation.
author
Carl Worth
<cworth@cworth.org>
Sat, 15 Jan 2011 22:01:43 +0000
(14:01 -0800)
committer
Carl Worth
<cworth@cworth.org>
Sat, 15 Jan 2011 23:37:43 +0000
(15:37 -0800)
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
patch
|
blob
|
history
diff --git
a/lib/database.cc
b/lib/database.cc
index 7a00917ec709ce3f7b30fff2699b993d2860840c..289e41c45bb4d8607fa0c1b31e31fa355bd21d40 100644
(file)
--- 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);