Fix resource leak CID 82779
Fix exception resource leak CID 82778
Fix exception resource leak CID 82777
Fix bad shift operation CID 82776
Fix exception resource leak CID 82746
Fix a possible null reference exception CID 82745
Fix exception resource leak CID 62659