aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2000-10-14 12:10:41 +0000
committerEric S. Raymond <esr@thyrsus.com>2000-10-14 12:10:41 +0000
commit3eb25ff0f6b44b5c4701592a73366c64b0128344 (patch)
tree175bd30aa191a7dc35bad583384e18eaf2f7dd35 /driver.c
parentb68a6f2976fcffb2fa2f5ff94c9347d2aa847a0a (diff)
downloadfetchmail-3eb25ff0f6b44b5c4701592a73366c64b0128344.tar.gz
fetchmail-3eb25ff0f6b44b5c4701592a73366c64b0128344.tar.bz2
fetchmail-3eb25ff0f6b44b5c4701592a73366c64b0128344.zip
Avoid coredump due to double free.
svn path=/trunk/; revision=2978
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/driver.c b/driver.c
index e0b86d6c..2399c8d2 100644
--- a/driver.c
+++ b/driver.c
@@ -479,6 +479,7 @@ static int readheaders(int sock,
set_timeout(0);
free(line);
free(msgblk.headers);
+ msgblk.headers = NULL;
return(PS_SOCKET);
}
set_timeout(0);
@@ -617,6 +618,7 @@ static int readheaders(int sock,
if (num == 1 && !strncasecmp(line, "X-IMAP:", 7)) {
free(line);
free(msgblk.headers);
+ msgblk.headers = NULL;
return(PS_RETAINED);
}
@@ -992,6 +994,7 @@ static int readheaders(int sock,
report(stdout,
_("forwarding and deletion suppressed due to DNS errors\n"));
free(msgblk.headers);
+ msgblk.headers = NULL;
free_str_list(&msgblk.recipients);
return(PS_TRANSIENT);
}
@@ -1002,6 +1005,7 @@ static int readheaders(int sock,
&good_addresses, &bad_addresses)) != PS_SUCCESS)
{
free(msgblk.headers);
+ msgblk.headers = NULL;
free_str_list(&msgblk.recipients);
return(n);
}
@@ -1099,6 +1103,7 @@ static int readheaders(int sock,
report(stdout, _("writing RFC822 msgblk.headers\n"));
release_sink(ctl);
free(msgblk.headers);
+ msgblk.headers = NULL;
free_str_list(&msgblk.recipients);
return(PS_IOERR);
}