Fix a memory leak, free the allocated WT_REF structure.