From: Thomas Roessler Date: Fri, 3 Mar 2000 08:25:41 +0000 (+0000) Subject: More missing fclose (3) calls. X-Git-Tag: mutt-1-1-8-rel~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=028d0e5a31fd44da1853f1ae9fce2606420322de;p=mutt More missing fclose (3) calls. --- diff --git a/imap/message.c b/imap/message.c index 0f9f0e9b..842aea0c 100644 --- a/imap/message.c +++ b/imap/message.c @@ -163,22 +163,31 @@ int imap_read_headers (CONTEXT *ctx, int msgbegin, int msgend) } imap_read_bytes (fp, CTX_DATA->conn, bytes); if (mutt_socket_read_line_d (buf, sizeof (buf), CTX_DATA->conn) < 0) + { + fclose (fp); return -1; - + } + pc = buf; } } else if (imap_handle_untagged (CTX_DATA, buf) != 0) + { + fclose (fp); return -1; + } } } while ((msgno + 1) >= fetchlast && mutt_strncmp (seq, buf, SEQLEN) != 0); h->content_length = -bytes; if (msg_parse_fetch (h, fetchbuf) == -1) + { + fclose (fp); return -1; - - /* subtract the header length; the total message size will be + } + + /* FIXME?: subtract the header length; the total message size will be added to this */ /* in case we get new mail while fetching the headers */ @@ -496,7 +505,6 @@ int imap_append_message (CONTEXT *ctx, MESSAGE *msg) if (len) flush_buffer(buf, &len, CTX_DATA->conn); - mutt_socket_write (CTX_DATA->conn, "\r\n"); fclose (fp);