fixed Coverity issue 1187592. Resoruce leak.