Fix resource leak CID 18117
Fix exception resource leak CID 18120
Fix exception resource leak CID 18123
Fix resource leak CID 18128