Minor code cleanups

Merged Alan Coopersmith requested to merge alanc/xcompmgr:misc into master
  • Reduce variable scope as suggested by cppcheck
  • Remove obsolete casts on malloc & free calls

Merge request reports