TS-1475: Close fd in error case in intercept plugin. Coverity #1214712