XX-11179:  Corrected various resource leaks reported by coverity scan