Fixed "Resource leak" #14249#coverity