Missing headers when forwarding html message as RFC822
[notmuch-archives.git] / ca / 76b0457004fddafcf0ea3d46401bbb56e8e8dd
1 Return-Path: <jani@nikula.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 1CD72429E3C\r
6         for <notmuch@notmuchmail.org>; Sun,  3 Nov 2013 04:25:19 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
9 X-Spam-Flag: NO\r
10 X-Spam-Score: -0.7\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
13         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id ZOzV-DC19HHu for <notmuch@notmuchmail.org>;\r
17         Sun,  3 Nov 2013 04:25:13 -0800 (PST)\r
18 Received: from mail-ee0-f42.google.com (mail-ee0-f42.google.com\r
19  [74.125.83.42])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
20  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
21  75BC1431FDA    for <notmuch@notmuchmail.org>; Sun,  3 Nov 2013 04:25:05 -0800\r
22  (PST)\r
23 Received: by mail-ee0-f42.google.com with SMTP id c1so184358eek.1\r
24         for <notmuch@notmuchmail.org>; Sun, 03 Nov 2013 04:25:04 -0800 (PST)\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=1e100.net; s=20130820;\r
27         h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
28         :references:in-reply-to:references;\r
29         bh=Q18zapYhmVYbh+wYHUDDutg6DE8zQhpUDFrY2a3Qmas=;\r
30         b=iEz6jU7Nn/OeaUBkLuU/Iub0cig8ysC33rdrDdiHYEQQZxwcVSG8wTB2dBxsU4ZfCB\r
31         z6v7WUsWxCCofAFLa7achwP1nD7vAKxG3L1/vJSR2vuTiDfR+9Lk7WTR+Dv3vPmDm/X0\r
32         nHnJjnWW6lvBUdxPUZeJ4QBhw5/+34rF3PzAVfiWcdOjRBJQGAHoJE/yItCyhpxGAqFT\r
33         gZ5vRG+OEiBB7bIaiv9iw6xIu+81kbgHNExzQnqYwT8e42gz5XDflI2O73Wl6h9UpFfe\r
34         G9g4bwGu9blbwPp2ScI6Sd7VmesrrXPFA8vJadNjSEqbOZF1RbMR5lsKJYTO1Bfw61Qo\r
35         dECw==\r
36 X-Gm-Message-State:\r
37  ALoCoQnsDSJJyXABn9et6tceEm+D/4i0Nd11Zx8f7SoM/Cs43hXxOghQRnyxKeYUkI+F5oYtfFq/\r
38 X-Received: by 10.15.111.202 with SMTP id cj50mr145983eeb.71.1383481504302;\r
39         Sun, 03 Nov 2013 04:25:04 -0800 (PST)\r
40 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
41         [88.195.111.91])\r
42         by mx.google.com with ESMTPSA id i1sm32877757eeg.0.2013.11.03.04.25.02\r
43         for <multiple recipients>\r
44         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
45         Sun, 03 Nov 2013 04:25:03 -0800 (PST)\r
46 From: Jani Nikula <jani@nikula.org>\r
47 To: notmuch@notmuchmail.org\r
48 Subject: [PATCH v2 04/11] lib: do not leak the database in compaction\r
49 Date: Sun,  3 Nov 2013 14:24:44 +0200\r
50 Message-Id:\r
51  <c795ec768c882b9f5b8d3b33492e4a8ad3a9284a.1383481295.git.jani@nikula.org>\r
52 X-Mailer: git-send-email 1.8.4.rc3\r
53 In-Reply-To: <cover.1383481295.git.jani@nikula.org>\r
54 References: <cover.1383481295.git.jani@nikula.org>\r
55 In-Reply-To: <cover.1383481295.git.jani@nikula.org>\r
56 References: <cover.1383481295.git.jani@nikula.org>\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Sun, 03 Nov 2013 12:25:19 -0000\r
70 \r
71 Destroy instead of close the database after compaction, and also on\r
72 error path, to not leak the database.\r
73 ---\r
74  lib/database.cc | 6 ++++--\r
75  1 file changed, 4 insertions(+), 2 deletions(-)\r
76 \r
77 diff --git a/lib/database.cc b/lib/database.cc\r
78 index 7a8702e..eadf8a7 100644\r
79 --- a/lib/database.cc\r
80 +++ b/lib/database.cc\r
81 @@ -941,10 +941,12 @@ notmuch_database_compact (const char* path,\r
82         goto DONE;\r
83      }\r
84  \r
85 -    notmuch_database_close(notmuch);\r
86 -\r
87  DONE:\r
88 +    if (notmuch)\r
89 +       notmuch_database_destroy (notmuch);\r
90 +\r
91      talloc_free(local);\r
92 +\r
93      return ret;\r
94  }\r
95  #else\r
96 -- \r
97 1.8.4.rc3\r
98 \r