fix memory leak

Change-Id: Ic1adc490773db03e875730e37bc15d82aa97e635