Get rid of memory leak condition detected by Coverity (10410-10416). #3515