Remove memory leaks

Change-Id: I13a74791b1d39edfbba7c7884057fa163c343a9a
Merge "Remove memory leaks" into kk44