config: fix memory leak in group section processing