opcservices: Improve error handling (Coverity).