aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-reply.c
diff options
context:
space:
mode:
authorGravatar Dmitry Kurochkin <dmitry.kurochkin@gmail.com>2011-06-15 15:12:12 +0400
committerGravatar Carl Worth <cworth@cworth.org>2011-06-15 07:08:18 -0700
commit565d87c2aab7d3c389a958c068323683316e5e0f (patch)
tree00da81cd9a851eb79f1cdf3f00c7a9f7e5304066 /notmuch-reply.c
parent52f751fb7442d7fd79e2a7dae5858f23e28e4438 (diff)
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.
Diffstat (limited to 'notmuch-reply.c')
-rw-r--r--notmuch-reply.c1
1 files changed, 1 insertions, 0 deletions
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;