Don't dereference nil. [rsc] --rw-rw-r-- M 1589387 glenda sys 13379 Oct 16 11:08 sys/src/cmd/bc.y /n/sourcesdump/2005/1016/plan9/sys/src/cmd/bc.y:796,802 - /n/sourcesdump/2005/1017/plan9/sys/src/cmd/bc.y:796,803 ln = 0; goto loop; } - Bterm(in); + if(in) + Bterm(in); if((in = Bopen(sargv[ifile], OREAD)) != 0){ ln = 0; ss = sargv[ifile]; [sys] --rwxrwxr-x M 1589387 rsc sys 81774 Oct 16 23:09 386/bin/bc /sys/src/cmd/bc.y:getch