Revert "Fixed "Resource leak" #14249#coverity"

This reverts commit 4b9863e7cf7fbc4ee6ea38d7947a7b53ec20fe87.