mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
_notmuch_message_index_file: unref (free) address lists from gmime.
Apparently as of GMime 2.4, you don't need to call internet_address_list_destroy anymore, but you still need to call g_object_unref (from the GMime Changelog). On the medium performance corpus, valgrind shows "possibly lost" leakage in "notmuch new" dropping from 7M to 300k.
This commit is contained in:
parent
27dacc7947
commit
47693539a6
1 changed files with 9 additions and 3 deletions
12
lib/index.cc
12
lib/index.cc
|
@ -484,12 +484,18 @@ mboxes is deprecated and may be removed in the future.\n", filename);
|
|||
}
|
||||
|
||||
from = g_mime_message_get_sender (mime_message);
|
||||
addresses = internet_address_list_parse_string (from);
|
||||
|
||||
_index_address_list (message, "from", addresses);
|
||||
addresses = internet_address_list_parse_string (from);
|
||||
if (addresses) {
|
||||
_index_address_list (message, "from", addresses);
|
||||
g_object_unref (addresses);
|
||||
}
|
||||
|
||||
addresses = g_mime_message_get_all_recipients (mime_message);
|
||||
_index_address_list (message, "to", addresses);
|
||||
if (addresses) {
|
||||
_index_address_list (message, "to", addresses);
|
||||
g_object_unref (addresses);
|
||||
}
|
||||
|
||||
subject = g_mime_message_get_subject (mime_message);
|
||||
_notmuch_message_gen_terms (message, "subject", subject);
|
||||
|
|
Loading…
Reference in a new issue