Fixed "Read from pointer after free" error #coverity
Fixed "Resource leak" #142253#coverity
Fixed "Resource leak" #14252#coverity
Merge pull request #79 from shaitan/master

Fixed "Read from pointer after free" error from coverity report.