]> git.notmuchmail.org Git - notmuch/commitdiff
lib: destroy message object after message removal
authorAli Polatel <alip@exherbo.org>
Mon, 3 Oct 2011 20:27:32 +0000 (23:27 +0300)
committerAli Polatel <alip@exherbo.org>
Tue, 4 Oct 2011 04:39:57 +0000 (07:39 +0300)
notmuch_database_remove_message() must call notmuch_message_destroy()
once it is done handling message removal.

lib/database.cc

index 9299c8d52e3c3e0a93c6906a64956236175abb60..d43e1143b76ae73a0e061625661ab5b72d3ef753 100644 (file)
@@ -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;