[PATCH 5.4 112/191] of: unittest: fix memory leak in attach_node_and_children