Fix memory leak issues found by Klocwork

Change-Id: If324d424dc11df435c26b0da11e314c7608180f9
10 files changed