From: Dmitry Kurochkin Date: Wed, 15 Jun 2011 11:12:12 +0000 (+0400) Subject: Fix double free in guess_from_received_header(). X-Git-Tag: debian/0.6_254~30 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=565d87c2aab7d3c389a958c068323683316e5e0f;ds=sidebyside 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. --- diff --git a/notmuch-reply.c b/notmuch-reply.c index 514bbc64..dab69e66 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -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;