TS-1475: Fix off by one which would leak a fd when it's 0. Coverity #1022135