memory leak fixed in Mergesort for linked list