Revert "visitor: free edges properly"

This reverts commit 3aa8ab15cd769dc4f6540a195d134af326583b63.