Fixed another memory leak in Tree #11053

Change-Id: Idf45309b83dfe718fe6e58b6cf57b211eeb9e811