fixed minor memory leak

edge linked list was not getting reset to head before free