Resource leaks fixes CID 1134957

Resource leaks fixes CID 1134957