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).
This commit is contained in:
Carl Worth 2011-01-15 14:01:43 -08:00
parent 36161181df
commit 8bef9ba922

View file

@ -1710,7 +1710,7 @@ notmuch_database_remove_message (notmuch_database_t *notmuch,
if (status) if (status)
return 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); find_doc_ids_for_term (notmuch, term, &i, &end);