Fixing some issues spotted by graham's run of clang's static analyser

UCC git Repository :: git.ucc.asn.au