Memory access and leak fixes for 1-bend graph.