free memory in merge sort