fix memory leak in hashtree_get_segment.