Fixed "Resource leak" #142253#coverity