2011-01-06 [pawel] 3.7.8cvs28
[claws.git] / src / procmime.c
index b325797eaea51e8e076253a5a4f36e541a5c53ef..eaec403b87b8876fcddfaf6d721c8687cacea0b0 100644 (file)
@@ -654,6 +654,7 @@ gint procmime_get_part(const gchar *outfile, MimeInfo *mimeinfo)
        while ((restlength > 0) && ((readlength = fread(buf, 1, restlength > BUFFSIZE ? BUFFSIZE : restlength, infp)) > 0)) {
                if (fwrite(buf, 1, readlength, outfp) != readlength) {
                        saved_errno = errno;
+                       fclose(infp);
                        fclose(outfp);
                        return -(saved_errno);
                }