Fix memory leak in guess_from_received_header().

Mta variable was not free()d in one case.
This commit is contained in:
Dmitry Kurochkin 2011-06-15 15:12:13 +04:00 committed by Carl Worth
parent 565d87c2aa
commit eeffa305eb

View file

@ -401,8 +401,10 @@ guess_from_received_header (notmuch_config_t *config, notmuch_message_t *message
break;
mta = xstrdup (by);
token = strtok(mta," \t");
if (token == NULL)
if (token == NULL) {
free (mta);
break;
}
/* Now extract the last two components of the MTA host name
* as domain and tld.
*/