=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/awk/lib.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- src/usr.bin/awk/lib.c 2004/12/30 01:52:48 1.15 +++ src/usr.bin/awk/lib.c 2005/11/23 02:43:45 1.16 @@ -1,4 +1,4 @@ -/* $OpenBSD: lib.c,v 1.15 2004/12/30 01:52:48 millert Exp $ */ +/* $OpenBSD: lib.c,v 1.16 2005/11/23 02:43:45 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -176,7 +176,7 @@ void nextfile(void) { - if (infile != stdin) + if (infile != stdin && infile != NULL) fclose(infile); infile = NULL; argno++;