]> granicus.if.org Git - mutt/commitdiff
More missing fclose (3) calls.
authorThomas Roessler <roessler@does-not-exist.org>
Fri, 3 Mar 2000 08:25:41 +0000 (08:25 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Fri, 3 Mar 2000 08:25:41 +0000 (08:25 +0000)
imap/message.c

index 0f9f0e9b0a61e78e3dded0c90337671af4e16f30..842aea0c4ce25ff88522c1226ec9a00b39a8a719 100644 (file)
@@ -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);