why?

On Sat, Dec 31, 2011, Loganaden Velvindron wrote:
> In du.c, fts_close() is missing before exit.
> fts_close() may also return -1 on hitting an
> error.
> 
> Index: usr.bin/du/du.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/du/du.c,v
> retrieving revision 1.23
> diff -u -p -r1.23 du.c
> --- usr.bin/du/du.c   27 Apr 2011 07:52:11 -0000      1.23
> +++ usr.bin/du/du.c   31 Dec 2011 16:29:26 -0000
> @@ -202,6 +202,10 @@ main(int argc, char *argv[])
> }
> if (errno)
> err(1, "fts_read");
> +
> +     if (fts_close(fts) == -1)
> +             err(1, "fts_close");
> +
> if (cflag) {
> prtout((quad_t)howmany(totalblocks, blocksize), "total", hflag);
> }

Reply via email to