From: Dmitry Kurochkin Date: Wed, 15 Jun 2011 11:12:13 +0000 (+0400) Subject: Fix memory leak in guess_from_received_header(). X-Git-Tag: debian/0.6_254~29 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=eeffa305eb302f52e326f7cb72a787556b8a7f00 Fix memory leak in guess_from_received_header(). Mta variable was not free()d in one case. --- diff --git a/notmuch-reply.c b/notmuch-reply.c index dab69e66..64f70bf7 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -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. */