diff -r b1bd262dc055 sys/src/cmd/awk/lib.c --- a/sys/src/cmd/awk/lib.c Mon Apr 15 19:48:03 2019 +0000 +++ b/sys/src/cmd/awk/lib.c Mon Apr 15 15:52:22 2019 -0700 @@ -167,7 +167,7 @@ void nextfile(void) { - if (infile != &stdin) + if (infile && infile != &stdin) Bterm(infile); infile = nil; argno++;