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).
if (status)
return status;
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);
find_doc_ids_for_term (notmuch, term, &i, &end);