mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
Fix double free in guess_from_received_header().
Before the change, the last loop in guess_from_received_header() did not reset domain and tld variables to NULL. This leads to double free error in some cases and possibly other bugs.
This commit is contained in:
parent
52f751fb74
commit
565d87c2aa
1 changed files with 1 additions and 0 deletions
|
@ -406,6 +406,7 @@ guess_from_received_header (notmuch_config_t *config, notmuch_message_t *message
|
|||
/* Now extract the last two components of the MTA host name
|
||||
* as domain and tld.
|
||||
*/
|
||||
domain = tld = NULL;
|
||||
while ((ptr = strsep (&token, delim)) != NULL) {
|
||||
if (*ptr == '\0')
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue