X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhparse.c;h=c57e74587729ab9bab278dd41ef509d4124986b7;hb=56539e8eafef3e955be9d08254d61b139faf34f1;hp=79997fd5e64c6cc5d49a18c97b49f40ef4e6e9cd;hpb=bad95d999e5f5a5cd729772f19937575075c85da;p=mmh diff --git a/uip/mhparse.c b/uip/mhparse.c index 79997fd..c57e745 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -26,7 +26,6 @@ #endif -extern int errno; extern int debugsw; extern int endian; /* mhmisc.c */ @@ -260,7 +259,6 @@ parse_mime (char *file) if (!(ct = get_content (fp, file, 1))) { if (is_stdin) unlink (file); - fclose (fp); advise (NULL, "unable to decode %s", file); return NULL; } @@ -294,6 +292,7 @@ parse_mime (char *file) * toplevel = 0 # we are inside message type or multipart type * # other than multipart/digest * toplevel = -1 # we are inside multipart/digest + * NB: on failure we will fclose(in)! */ static CT @@ -1057,7 +1056,6 @@ next_part: if (!(p = get_content (fp, ct->c_file, ct->c_subtype == MULTI_DIGEST ? -1 : 0))) { - fclose (ct->c_fp); ct->c_fp = NULL; return NOTOK; } @@ -1286,7 +1284,6 @@ invalid_param: fseek (fp = ct->c_fp, ct->c_begin, SEEK_SET); if (!(p = get_content (fp, ct->c_file, 0))) { - fclose (ct->c_fp); ct->c_fp = NULL; return NOTOK; }