[PATCH v2 1/2] lib: destroy message object after message removal

Ali Polatel polatel at gmail.com
Mon Oct 3 13:40:14 PDT 2011


From: Ali Polatel <alip at exherbo.org>

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



More information about the notmuch mailing list