diff options
Diffstat (limited to 'nand-utils/nandwrite.c')
-rw-r--r-- | nand-utils/nandwrite.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nand-utils/nandwrite.c b/nand-utils/nandwrite.c index 8f21593..e8a210c 100644 --- a/nand-utils/nandwrite.c +++ b/nand-utils/nandwrite.c @@ -605,7 +605,8 @@ int main(int argc, char * const argv[]) failed = false; closeall: - close(ifd); + if (ifd > 0 && ifd != STDIN_FILENO) + close(ifd); libmtd_close(mtd_desc); free(filebuf); close(fd); |