X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fdatabase.cc;h=0052cb659e896841e8c54e1850864fcd0ef1e8ad;hp=96458f6ff104a18ba28d59929b7597cf284feeec;hb=ea301102abc55404b8b447cd50998429bfbbf9fd;hpb=2c96956b3b5d60ae25885f4fa06cbc98e567d263 diff --git a/lib/database.cc b/lib/database.cc index 96458f6f..0052cb65 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -733,6 +733,15 @@ notmuch_status_t notmuch_database_destroy (notmuch_database_t *notmuch) { notmuch_status_t status; + const char* talloc_report; + + talloc_report = getenv ("NOTMUCH_TALLOC_REPORT"); + if (talloc_report && strcmp (talloc_report, "") != 0) { + FILE *report = fopen (talloc_report, "a"); + if (report) { + talloc_report_full (notmuch, report); + } + } status = notmuch_database_close (notmuch);