Executed make indent and fix some compilation warnings
Fix memory leak issue reported by Coverity
EUCA-9885