[PATCH v3 11/12] emacs: s/tags/tag-changes/ for arguments of tagging functions
[notmuch-archives.git] / c3 / dccdc4d02f6f5e88dabd479fa80f45a9ffd29c
1 Return-Path: <anton@khirnov.net>\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 D9529429E22\r
6         for <notmuch@notmuchmail.org>; Sun,  8 May 2011 23:46:50 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id oH48o1UYLhVg for <notmuch@notmuchmail.org>;\r
16         Sun,  8 May 2011 23:46:50 -0700 (PDT)\r
17 Received: from smtp1.kolej.mff.cuni.cz (smtp1.kolej.mff.cuni.cz\r
18         [78.128.192.10])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id C0ACB429E20\r
22         for <notmuch@notmuchmail.org>; Sun,  8 May 2011 23:46:49 -0700 (PDT)\r
23 X-Envelope-From: anton@khirnov.net\r
24 Received: from zohar.localdomain (zohar.kolej.mff.cuni.cz [78.128.198.199])\r
25         by smtp1.kolej.mff.cuni.cz (8.14.4/8.14.4) with ESMTP id p496kjDl074702\r
26         for <notmuch@notmuchmail.org>; Mon, 9 May 2011 08:46:46 +0200 (CEST)\r
27         (envelope-from anton@khirnov.net)\r
28 Received: by zohar.localdomain (Postfix, from userid 1000)\r
29         id 2B6AD7F508; Mon,  9 May 2011 08:46:45 +0200 (CEST)\r
30 From: Anton Khirnov <anton@khirnov.net>\r
31 Subject: Re: [PATCH] lib/message-file: plug three memleaks.\r
32 To: notmuch@notmuchmail.org\r
33 In-Reply-To: <1302878638-17634-1-git-send-email-anton@khirnov.net>\r
34 References: <1302878638-17634-1-git-send-email-anton@khirnov.net>\r
35 Date: Mon, 09 May 2011 08:46:44 +0200\r
36 Message-Id: <20110509064645.2B6AD7F508@zohar.localdomain>\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Mon, 09 May 2011 06:46:51 -0000\r
50 \r
51 On Fri, 15 Apr 2011 16:43:58 +0200, Anton Khirnov <anton@khirnov.net> wrote:\r
52 > ---\r
53 >  lib/message-file.c |    5 +++++\r
54 >  1 files changed, 5 insertions(+), 0 deletions(-)\r
55\r
56 > diff --git a/lib/message-file.c b/lib/message-file.c\r
57 > index 7722832..b7b3286 100644\r
58 > --- a/lib/message-file.c\r
59 > +++ b/lib/message-file.c\r
60 > @@ -341,12 +341,17 @@ notmuch_message_file_get_header (notmuch_message_file_t *message,\r
61 >               strncpy(combined_header,header_sofar,hdrsofar);\r
62 >               *(combined_header+hdrsofar) = ' ';\r
63 >               strncpy(combined_header+hdrsofar+1,decoded_value,newhdr+1);\r
64 > +             free(decoded_value);\r
65 >               g_hash_table_insert (message->headers, header, combined_header);\r
66 >           }\r
67 >       } else {\r
68 >           if (header_sofar == NULL) {\r
69 >               /* Only insert if we don't have a value for this header, yet. */\r
70 >               g_hash_table_insert (message->headers, header, decoded_value);\r
71 > +         } else {\r
72 > +             free(header);\r
73 > +             free(decoded_value);\r
74 > +             decoded_value = header_sofar;\r
75 >           }\r
76 >       }\r
77 >       /* if we found a match we can bail - unless of course we are\r
78 > -- \r
79 > 1.7.4.1\r
80\r
81 > _______________________________________________\r
82 > notmuch mailing list\r
83 > notmuch@notmuchmail.org\r
84 > http://notmuchmail.org/mailman/listinfo/notmuch\r
85 \r
86 ping\r
87 \r
88 --\r
89 Anton Khirnov\r