Fix a file descriptor leak in procmime_decode_content().
authorAndrej Kacian <ticho@claws-mail.org>
Wed, 12 Jul 2017 16:48:48 +0000 (18:48 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Wed, 12 Jul 2017 16:48:48 +0000 (18:48 +0200)
Closes bug #3266 - procmime.c: FILE leak in specific circumstances

src/procmime.c

index e41394d..f62487c 100644 (file)
@@ -459,8 +459,8 @@ gboolean procmime_decode_content(MimeInfo *mimeinfo)
                                if (SC_FPUTS(buf, outfp) == EOF)
                                        err = TRUE;
                        }
-                       procmime_fclose(tmpfp);
                }
+               procmime_fclose(tmpfp);
        } else if (encoding == ENC_X_UUENCODE) {
                gchar outbuf[BUFFSIZE];
                gint len;