diff options
author | Alexey I. Froloff <raorn@altlinux.org> | 2008-06-11 22:45:14 -0700 |
---|---|---|
committer | Alexey I. Froloff <raorn@altlinux.org> | 2008-06-11 22:45:14 -0700 |
commit | ffbb48902c2c298eb1435e915d570ce2f3143fce (patch) | |
tree | cd8f23724a9371c25b1d52b247d174f70c2b4fa5 /attach.c | |
parent | 95255116d1715f3b2d8b242bc1c478725856c972 (diff) |
Do not attempt to close invalid descriptors. Closes #3075
Diffstat (limited to 'attach.c')
-rw-r--r-- | attach.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -561,10 +561,11 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr, if ((mutt_wait_filter (thepid) || (entry->needsterminal && option (OPTWAITKEY))) && !use_pager) mutt_any_key_to_continue (NULL); - - close(tempfd); - close(pagerfd); - + + if (tempfd != -1) + close (tempfd); + if (pagerfd != -1) + close (pagerfd); } else { |