svn commit: r327277 - head/usr.bin/wall
Warner Losh
imp at FreeBSD.org
Thu Dec 28 05:34:39 UTC 2017
Author: imp
Date: Thu Dec 28 05:34:29 2017
New Revision: 327277
URL: https://svnweb.freebsd.org/changeset/base/327277
Log:
Close the fp rather than the fd since we fdopen the fd so we don't
leak the FILE *.
CID: 978383
Modified:
head/usr.bin/wall/wall.c
Modified: head/usr.bin/wall/wall.c
==============================================================================
--- head/usr.bin/wall/wall.c Thu Dec 28 05:34:24 2017 (r327276)
+++ head/usr.bin/wall/wall.c Thu Dec 28 05:34:29 2017 (r327277)
@@ -290,5 +290,5 @@ makemsg(char *fname)
err(1, "out of memory");
if ((int)fread(mbuf, sizeof(*mbuf), mbufsize, fp) != mbufsize)
err(1, "can't read temporary file");
- (void)close(fd);
+ fclose(fp);
}
More information about the svn-src-head
mailing list