summaryrefslogtreecommitdiffstats
path: root/usr.bin/vacation
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-04-23 22:40:19 +0000
committerache <ache@FreeBSD.org>1997-04-23 22:40:19 +0000
commita5e825e238c466bcfacb8eced34f9dc0133f506f (patch)
treea45645b78483c9b6923bad9b7a2ffd3b965c5dff /usr.bin/vacation
parent2d3f3d2ffc015e37c6057c408889739e8c00e1f0 (diff)
downloadFreeBSD-src-a5e825e238c466bcfacb8eced34f9dc0133f506f.zip
FreeBSD-src-a5e825e238c466bcfacb8eced34f9dc0133f506f.tar.gz
Even better fix: use close(fileno(mfp)); to close unneded descriptor
and not clobber memory by fclose().
Diffstat (limited to 'usr.bin/vacation')
-rw-r--r--usr.bin/vacation/vacation.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/vacation/vacation.c b/usr.bin/vacation/vacation.c
index 49fc619..6cfdfc8 100644
--- a/usr.bin/vacation/vacation.c
+++ b/usr.bin/vacation/vacation.c
@@ -40,7 +40,7 @@ static char copyright[] =
#ifndef lint
static char sccsid[] = "From: @(#)vacation.c 8.2 (Berkeley) 1/26/94";
static char rcsid[] =
- "$Id: vacation.c,v 1.7 1997/04/23 22:25:20 ache Exp $";
+ "$Id: vacation.c,v 1.8 1997/04/23 22:36:51 ache Exp $";
#endif /* not lint */
/*
@@ -424,6 +424,7 @@ sendmessage(myname)
dup2(pvect[0], 0);
close(pvect[0]);
close(pvect[1]);
+ close(fileno(mfp));
execl(_PATH_SENDMAIL, "sendmail", "-f", myname, from, NULL);
syslog(LOG_ERR, "vacation: can't exec %s: %s",
_PATH_SENDMAIL, strerror(errno));
OpenPOWER on IntegriCloud