avoid memory leak

Change-Id: I89e458dbd01a45761948b64cb457424383ca5f51