Fix memory leak in gambit walk