diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2000-10-14 12:10:41 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2000-10-14 12:10:41 +0000 |
commit | 3eb25ff0f6b44b5c4701592a73366c64b0128344 (patch) | |
tree | 175bd30aa191a7dc35bad583384e18eaf2f7dd35 /driver.c | |
parent | b68a6f2976fcffb2fa2f5ff94c9347d2aa847a0a (diff) | |
download | fetchmail-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.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); } |