diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1998-10-05 21:03:36 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1998-10-05 21:03:36 +0000 |
commit | 50d787a081ce9a5415a62275ed5601b9ee1270ce (patch) | |
tree | 20de1f6f5f7ac47740ab929c23b34f2a721eec79 /handler.c | |
parent | 19fbdcf0bff0e1a81debe644c8a23576222eb9d1 (diff) |
File descriptor leak alert.
Diffstat (limited to 'handler.c')
-rw-r--r-- | handler.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1098,8 +1098,7 @@ void autoview_handler (BODY *a, STATE *s) fflush(fpin); rewind(fpin); thepid = mutt_create_filter_fd (command, NULL, &fpout, &fperr, - dup(fileno(fpin)), -1, -1); - fclose(fpin); + fileno(fpin), -1, -1); } if (s->prefix) @@ -1151,7 +1150,9 @@ void autoview_handler (BODY *a, STATE *s) fclose (fpout); fclose (fperr); mutt_wait_filter (thepid); - if(!piped) + if(piped) + fclose(fpin); + else mutt_unlink (tempfile); if (s->flags & M_DISPLAY) |