From: Carl Worth Date: Sat, 15 Jan 2011 22:01:43 +0000 (-0800) Subject: Tighten up a memory allocation. X-Git-Tag: debian/0.6_254~220 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=8bef9ba9220956beb8ff634c16344fb00689b973 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). --- 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);