X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=database.cc;h=59e837360018a72aeff4195f21b0b3b724e75334;hp=a53651035d9febd791b56c5d2b631b9d4db96da7;hb=5a84df0f1507753b1776636ad268d36b7346a8fd;hpb=968feafbad724da29c7fb5d48f6d363150e48caf diff --git a/database.cc b/database.cc index a5365103..59e83736 100644 --- a/database.cc +++ b/database.cc @@ -24,7 +24,7 @@ #include -#include /* g_strdup_printf, g_free, GHashTable */ +#include /* g_strdup_printf, g_free, GPtrArray, GHashTable */ using namespace std; @@ -577,7 +577,6 @@ notmuch_database_add_message (notmuch_database_t *notmuch, free (id); } - g_ptr_array_free (thread_ids, TRUE); doc.add_value (NOTMUCH_VALUE_THREAD, thread_id->str); g_string_free (thread_id, TRUE); } else if (message_id) { @@ -589,6 +588,8 @@ notmuch_database_add_message (notmuch_database_t *notmuch, doc.add_value (NOTMUCH_VALUE_THREAD, thread_id.str); } + g_ptr_array_free (thread_ids, TRUE); + free (message_id); date = notmuch_message_get_header (message, "date");