Coverity fixes

Some small coverity fixes in the examples / client parts.