Fix memory leak

Change-Id: I71fa448cd8e3d0ecada83f22d2f202eddc441b95