[PATCH v2 1/2] lib: destroy message object after message removal
authorAli Polatel <polatel@gmail.com>
Mon, 3 Oct 2011 20:40:14 +0000 (23:40 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:34 +0000 (09:39 -0800)
e1/53e1a03de82a81c19c58a5614a92aa5a1fbd06 [new file with mode: 0644]

diff --git a/e1/53e1a03de82a81c19c58a5614a92aa5a1fbd06 b/e1/53e1a03de82a81c19c58a5614a92aa5a1fbd06
new file mode 100644 (file)
index 0000000..20c4f0b
--- /dev/null
@@ -0,0 +1,91 @@
+Return-Path: <polatel@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id DFF11429E21\r
+       for <notmuch@notmuchmail.org>; Mon,  3 Oct 2011 13:40:33 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id Jg4N6WZg9jfb for <notmuch@notmuchmail.org>;\r
+       Mon,  3 Oct 2011 13:40:33 -0700 (PDT)\r
+Received: from mail-dy0-f53.google.com (mail-dy0-f53.google.com\r
+       [209.85.220.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id F3D26431FB6\r
+       for <notmuch@notmuchmail.org>; Mon,  3 Oct 2011 13:40:32 -0700 (PDT)\r
+Received: by dye4 with SMTP id 4so207787dye.26\r
+       for <notmuch@notmuchmail.org>; Mon, 03 Oct 2011 13:40:31 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
+       :in-reply-to:references:organization;\r
+       bh=KEbdSaoIzJCiUVqVAmtvI99G4hnhcJSuisQ7m4WZ6i4=;\r
+       b=whzllbX9W9gHNO2AK6lrkYvRAiLslnPXmMLmOV7slEpEhfMUmbalJPoR4T53GBAMw9\r
+       sT27ehZQaU5MKcbKKJCUuSQcYhnHojRja7ftosqOUqNHry2xmw9bwqs0segR86jijZ89\r
+       L4aL4OWFakDwTkbFWvvFzBk8o9GWPxD/CXJmo=\r
+Received: by 10.223.41.153 with SMTP id o25mr463981fae.79.1317674417270;\r
+       Mon, 03 Oct 2011 13:40:17 -0700 (PDT)\r
+Received: from localhost ([85.104.4.184])\r
+       by mx.google.com with ESMTPS id w14sm22622542fae.13.2011.10.03.13.40.15\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 03 Oct 2011 13:40:16 -0700 (PDT)\r
+From: Ali Polatel <polatel@gmail.com>\r
+To: Austin Clements <amdragon@MIT.EDU>\r
+Subject: [PATCH v2 1/2] lib: destroy message object after message removal\r
+Date: Mon,  3 Oct 2011 23:40:14 +0300\r
+Message-Id:\r
+ <0c009ba81b80124a96915e3e270cb77d6f6d40b6.1317674063.git.alip@exherbo.org>\r
+X-Mailer: git-send-email 1.7.6.1\r
+In-Reply-To: <cover.1317674063.git.alip@exherbo.org>\r
+References: <20111003203837.GA22365@hayalet>\r
+       <cover.1317674063.git.alip@exherbo.org>\r
+In-Reply-To: <cover.1317674063.git.alip@exherbo.org>\r
+References: <cover.1317674063.git.alip@exherbo.org>\r
+Organization: Pink Floyd\r
+Cc: Ali Polatel <alip@exherbo.org>,\r
+       Notmuch Mailing List <notmuch@notmuchmail.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 03 Oct 2011 20:40:34 -0000\r
+\r
+From: Ali Polatel <alip@exherbo.org>\r
+\r
+notmuch_database_remove_message() must call notmuch_message_destroy()\r
+once it is done handling message removal.\r
+---\r
+ lib/database.cc |    2 ++\r
+ 1 files changed, 2 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/lib/database.cc b/lib/database.cc\r
+index 9299c8d..d43e114 100644\r
+--- a/lib/database.cc\r
++++ b/lib/database.cc\r
+@@ -1769,6 +1769,8 @@ notmuch_database_remove_message (notmuch_database_t *notmuch,\r
+               _notmuch_message_delete (message);\r
+           else if (status == NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID)\r
+               _notmuch_message_sync (message);\r
++\r
++          notmuch_message_destroy (message);\r
+     }\r
\r
+     return status;\r
+-- \r
+1.7.6.1\r
+\r