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