Fixed "Resource leak" #14252#coverity