Coverity fixes

Coverity fixes CID 1134965, 1134963 : Resource leak