We were properly feeing this memory when the thread-ids list was not
empty, but leaking it when it was.
Thanks, of course, to valgrind along with the G_SLICE=always-malloc
environment variable which makes leak checking with glib almost
bearable.
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) {
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");