CLOUDSTACK-7706: Coverity defects

Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>