]> git.notmuchmail.org Git - notmuch/blobdiff - lib/database.cc
lib/database: fix style mistake.
[notmuch] / lib / database.cc
index 96458f6ff104a18ba28d59929b7597cf284feeec..6db82373dddecb09df66521dd3f69c3cdd1d6fd3 100644 (file)
@@ -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);