s3-rpc_server: Make sure that fd is really closed on error.