Fixed "Resource leak" #14253#coverity