]> git.notmuchmail.org Git - notmuch/blobdiff - lib/message.cc
Fix double free in guess_from_received_header().
[notmuch] / lib / message.cc
index ecda75af208b416124fd9cc6bc165c56e5ed0521..4b59fa9133f9cc45227bc8fbb63e0baeb3f7e7f3 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <gmime/gmime.h>
 
-struct _notmuch_message {
+struct visible _notmuch_message {
     notmuch_database_t *notmuch;
     Xapian::docid doc_id;
     int frozen;
@@ -213,7 +213,6 @@ _notmuch_message_create_for_message_id (notmuch_database_t *notmuch,
 {
     notmuch_message_t *message;
     Xapian::Document doc;
-    Xapian::WritableDatabase *db;
     unsigned int doc_id;
     char *term;
 
@@ -233,7 +232,6 @@ _notmuch_message_create_for_message_id (notmuch_database_t *notmuch,
     if (notmuch->mode == NOTMUCH_DATABASE_MODE_READ_ONLY)
        INTERNAL_ERROR ("Failure to ensure database is writable.");
 
-    db = static_cast<Xapian::WritableDatabase *> (notmuch->xapian_db);
     try {
        doc.add_term (term, 0);
        talloc_free (term);