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);
 }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to