Correction of previous commit 6fedb78e7.
authorAndrej Kacian <ticho@claws-mail.org>
Wed, 12 Jul 2017 18:43:07 +0000 (20:43 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Wed, 12 Jul 2017 18:44:05 +0000 (20:44 +0200)
We do not want to prematurely close tmpfp handle if
it points to outfp.

src/procmime.c

index f62487c..2559dce 100644 (file)
@@ -460,7 +460,8 @@ gboolean procmime_decode_content(MimeInfo *mimeinfo)
                                        err = TRUE;
                        }
                }
-               procmime_fclose(tmpfp);
+               if (tmpfp != outfp)
+                       procmime_fclose(tmpfp);
        } else if (encoding == ENC_X_UUENCODE) {
                gchar outbuf[BUFFSIZE];
                gint len;