Fix leak in dfs_iterative