From: Sascha Wildner Date: Sat, 3 Dec 2011 09:39:06 +0000 (+0100) Subject: du(1): Move the fts_close() behind fts_read()'s errno check. X-Git-Tag: v3.0.0~496 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/10e8ef77f4bbd22dd9dcd3cbefc1960dda60256a du(1): Move the fts_close() behind fts_read()'s errno check. --- diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c index a729ef5..62c8396 100644 --- a/usr.bin/du/du.c +++ b/usr.bin/du/du.c @@ -279,11 +279,12 @@ main(int argc, char **argv) if (p->fts_parent->fts_pointer) savednumber = *(du_number_t *)p->fts_parent->fts_pointer; } - fts_close(fts); if (errno) err(1, "fts_read"); + fts_close(fts); + if (cflag) { if (hflag) { (void) prthumanval(howmany(savednumber, blocksize));