From 3eb25ff0f6b44b5c4701592a73366c64b0128344 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 14 Oct 2000 12:10:41 +0000 Subject: Avoid coredump due to double free. svn path=/trunk/; revision=2978 --- driver.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'driver.c') 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); } -- cgit v1.2.3